SlideShare a Scribd company logo
www.edureka.co/mastering-node-js
View Mastering Node.js course details at www.edureka.co/mastering-node-js
For Queries during the session and class recording:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email us : sales@edureka.co
Node JS Express - Steps to create Restful Web App
Slide 2 www.edureka.co/mastering-node-jsSlide 2
The Importance or Reason for this Course
Node.js is a platform for building high performance, event-driven, real-time and scalable networking
applications just using javascript.
You will receive hands-on training in Node.js, building networking and web based applications that are far
superior and efficient than your regular languages.
And the best part : It's all in Javascript – on the server or on the client – Javascript Everywhere!
This course is designed to help you learn this amazing platform with great ease, with the help of hands-on
training, code snippets, live sessions and expert support.
Slide 3 www.edureka.co/mastering-node-jsSlide 3
Demand for this Course
Javascript is an ubiquitous language known by millions of developers worldwide. When using Node.js,
Javascript becomes a fully-functional server side programming language that is well suited for making real-time
business apps and APIs
More and more employers & entrepreneurs are switching their technologies to Node.js
Cases in point : Walmart, Paypal/Ebay, Microsoft, LinkedIn, Yahoo, Yammer (Now part of Microsoft) and the list
is never ending.
Slide 4 www.edureka.co/mastering-node-jsSlide 4
Job Trends
Salaries for Node.js Developers are already in the $60,000 range and much more.
From the graph below : The number of jobs are skyrocketing.
Slide 5 www.edureka.co/mastering-node-js
LIVE Online Class
Class Recording in LMS
24/7 Post Class Support
Module Wise Quiz
Project Work
Verifiable Certificate
Course Features
Slide 6 www.edureka.co/mastering-node-js
Objectives
At the end of the session you will be able to learn:
Nodejs express
Creating Restful Web App
NPM
Templates in Express
Slide 7 www.edureka.co/mastering-node-jsSlide 7
What is Node.js ?
It is an Open-Source, Cross-Platform runtime environment for networking applications
It is built on top of Google Chrome’s JavaScript Runtime : V8
This lets us build fast, highly scalable networking applications just using JavaScript
It is an Asynchronous Event driven framework
Guess What ?
» IT’s SINGLE THREADED !!
» No worries about : race conditions, deadlocks and other problems that go with multi-threading.
» “Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks,
less-than-expert programmers are able to develop scalable systems.” - (courtesy : nodejs.org)
Slide 8 www.edureka.co/mastering-node-jsSlide 8
What is Node.js ?
Node.js is Event Driven. Uses the Event Emitter model
Just because Node.js is Single Threaded does not mean you can’t have multiple cores in your application. We
can fork or spawn child processes from the main node process any time
» This lets us even fire shell commands or even start up another Application straight from your Node.js
Application
Slide 9 www.edureka.co/mastering-node-jsSlide 9
Your First Node.js Program
Thats right : since we deal with good ol’ Javascript. Lets write our first program :
function yooohoooWorld()
{
console.log(‘Yooddleeeyodleeyodleeeeooooo World!!!’);
}
yooohoooWorld();
Copy that onto a new file and save it with a “.js” extension
Go to command line, cd to the folder with that file and run : node example.js
In fact, Node.js comes with an REPL (Read-Eval-Print-Loop) : a simple command line tool to interactively run
Javascript and see the results. Just type “node” on the command line and hit enter
Slide 10 www.edureka.co/mastering-node-jsSlide 10
Basics of Node.js : npm
npm used to stand for Node Package Manager. Now it stands for nothing. Its actually not an acronym. npm is
not a Node.js specific tool any more
npm is a registry of reusable modules and packages written by various developers
» Yes, you can publish your own npm packages
There are two ways to install npm packages :
» Locally : To use and depend on the package from your own module or project
» Globally : To use across the system, like a command line tool
Installing a package locally :
» The package is easily downloaded by just saying npm install <packagename>
» This will create a node_modules directory (if it does not exist yet) and will download the package there
» Once installed you can use it in any js file of your project by saying
» var obj = require(‘packagename’);
Slide 11 www.edureka.co/mastering-node-jsSlide 11
Basics of Node.js : npm
Tip: Next time you want to clone or
copy your project to another server,
just copy the code you wrote and
the package.json file. Then run
npm install on that server
Installing a package locally ...contd. :
» Another way to save packages locally is by using a package.json file.
» Advantage > ?
» Once you have a package.json file in your directory, and you run npm install, all package names listed in
there are downloaded
» Thats really cool. Because now, your build is “reproducible”
» package.json :
{
"name": "demo-app",
"version": "1.0.0"
}
» Then npm install --save <packagename>. This adds the package name to the package.json
Slide 12 www.edureka.co/mastering-node-jsSlide 12
Basics of Node.js : npm
Installing a package locally ...contd. :
You can also manually enter the name of the package and the version number to your package.json file like so :
{
"name": "demo-app",
"version": "1.0.0",
"dependencies": {
"packagename": "^2.4.1"
}
}
Slide 13 www.edureka.co/mastering-node-jsSlide 13
To install an npm package globally :
just run npm install -g <packagename>
To update or uninstall a globally installed package, just
run npm update or npm uninstall with the -g option
Basics of Node.js : npm
Tip: Most often when globally installing a package you would need root access :
→ On Windows the following command will open the Command Line as
Administrator
Slide 14 www.edureka.co/mastering-node-jsSlide 14
Basics of Node.js : npm
→ Tip: Most often when globally installing a package you would need root
access :
» Another alternative for Windows which will come in handy is
installing some other Command Line alternative like Console2
(http://sourceforge.net/projects/console/) or ConEmu
(http://www.fosshub.com/ConEmu.html) , etc.
» For Linux/Unix/Mac : sudo npm install -g <packagename>
Slide 15 www.edureka.co/mastering-node-jsSlide 15
Express JS
Express JS : Web Framework for Node.js. It is an npm package
To install : npm install express //in the main project folder
Express JS also provides a tool to create a simple folder structure for your app : express-generator :
npm install express-generator -g //To be installed globally
» Now, saying express newapp will create a project called newapp in the current working directory along
with a simple folder structure.
» The dependencies will then be installed by doing a cd newapp and then npm install
» To run the app
» node ./bin/www // This is where the server is run and listening on a port
Slide 16 www.edureka.co/mastering-node-jsSlide 16
Express JS : Templates
By default Express supports the Jade Template Engine for the HTML Views.
What is an Javascript Template Engine : it is a framework to help bind data to your HTML views
Why do you need one ?
» Helps you easily bind data from the back end with the HTML view
» Helps in bundling HTML code into reusable modules/layouts
» Adds basic conditionals & iterations / loops to your HTML. HTML does not support “If -Else” or “for”
loops.
Many Javascript Template Engines are available : Jade, Handlebars, Hogan, EJS, etc.
Slide 17 www.edureka.co/mastering-node-jsSlide 17
Express JS : Templates
To use the default Jade template engine continue as described before
To use Handlebars,
express --hbs newapp
To use Hogan,
express -H newapp or express --hogan newapp
To use EJS,
express -e newapp or express --ejs newapp
If you want to use a css engine like stylus or less add the following option : --css <engine>
where <engine> can be less or stylus or compass
You can use the --force or -f option to force the express generator on a non-empty directory
Slide 18 www.edureka.co/mastering-node-jsSlide 18
Express JS : Jade
Jade is a simple Javascript Template engine for writing HTML. No config has to be set up for ExpressJS since it
is the default view engine
However, Jade has a different syntax as compared to HTML, may not preferred by some developers.
Example of Jade syntax :
JADE
html
head
title My App Title
body
h1= pageHeaderVar
div.className
p.
some
content
HTML
<html>
<head>
<title> My App Title
</title>
</head>
<body>
<h1>Page Header</h1>
<div class=”className”>
<p>
some
content
</p>
</div>
</body>
</html>
Slide 19 www.edureka.co/mastering-node-jsSlide 19
Express JS : Handlebars
Handlebars is a Javascript Template Engine having a much more simple HTML like syntax. Actually Handlebars
templates are HTML with a few added operators and some javascript functions available for use.
To use Handlebars in Express JS, we use the “hbs” npm package which is a simple wrapper for Handlebars.js.
To use this as the view engine in place of Jade, we first have to npm install hbs if you have not already used
the express-generator’s --hbs option to express command.
Set view engine in app.js to app.set(‘view-engine’,’hbs’)
For the most part, Handlebars is nothing but HTML, intermingled with Handlebar Expressions. A Handlebar
Expression is, {{ with some expression/variable or content followed by }}.
Slide 20 www.edureka.co/mastering-node-jsSlide 20
Express JS : Handlebars
So if a Handlebar template is being rendered and an object, {greeting: “Hello World”, subgreeting: “Hey folks
I’m using HBS”} is passed to it, the handlebar syntax will look something like this :
//- index.hbs
<div>
<h1>{{greeting}}</h1>
<h5>{{subgreeting}}</h5>
</div>
//After Rendering :
<div>
<h1>Hello World</h1>
<h5>Hey folks I’m using
HBS</h5>
</div>
Slide 21 www.edureka.co/mastering-node-jsSlide 21
Express JS : A Simple Express Application
var express = require(‘express’);
var app = express();
app.get(‘/’,function(req,res){
res.send(‘Hello World !!”);
})
app.listen(3000,function(){
console.log(‘Express Server listening on port 3000);
})
Slide 22 www.edureka.co/mastering-node-js
DEMO
Slide 23 www.edureka.co/mastering-node-js
Course Topics
→ Module 7
» Forks, Spawns and the Process Module
→ Module 8
» Testing in Node.js
→ Module 9
» Node.js in the Tech World
→ Module 1
» Introduction to Objects in Javascript & Node.js
→ Module 2
» Modules / Packages
→ Module 3
» Events & Streams
→ Module 4
» Network Communication & Web Technology in
Node.js
→ Module 5
» Building a Web Application
→ Module 6
» Real-time Communication
Slide 24 www.edureka.co/mastering-node-js
Questions
Slide 25 www.edureka.co/mastering-node-js

More Related Content

What's hot

Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
Warren Zhou
 
WordCamp Montreal 2016 WP-API + React with server rendering
WordCamp Montreal 2016  WP-API + React with server renderingWordCamp Montreal 2016  WP-API + React with server rendering
WordCamp Montreal 2016 WP-API + React with server rendering
Ziad Saab
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
Brian Hogg
 
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenBP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
Michael McGarel
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Max Andersen
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
 
Web Development with NodeJS
Web Development with NodeJSWeb Development with NodeJS
Web Development with NodeJS
Riza Fahmi
 
How To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages ApplicationHow To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages Application
Michael McGarel
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocketMing-Ying Wu
 
Mastering Grunt
Mastering GruntMastering Grunt
Mastering Grunt
Spencer Handley
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
juzten
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
정윤 김
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)
Joseph Chiang
 
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
Kazuaki Matsuo
 
Intro to Laravel 4
Intro to Laravel 4Intro to Laravel 4
Intro to Laravel 4
Singapore PHP User Group
 
A Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on RailsA Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on Rails
Rafael García
 

What's hot (20)

Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 
WordCamp Montreal 2016 WP-API + React with server rendering
WordCamp Montreal 2016  WP-API + React with server renderingWordCamp Montreal 2016  WP-API + React with server rendering
WordCamp Montreal 2016 WP-API + React with server rendering
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenBP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 
Web Development with NodeJS
Web Development with NodeJSWeb Development with NodeJS
Web Development with NodeJS
 
YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
How To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages ApplicationHow To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages Application
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
 
Mastering Grunt
Mastering GruntMastering Grunt
Mastering Grunt
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
backend
backendbackend
backend
 
Hitchhiker's guide to the front end development
Hitchhiker's guide to the front end developmentHitchhiker's guide to the front end development
Hitchhiker's guide to the front end development
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)
 
AspNetWhitePaper
AspNetWhitePaperAspNetWhitePaper
AspNetWhitePaper
 
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
 
Intro to Laravel 4
Intro to Laravel 4Intro to Laravel 4
Intro to Laravel 4
 
A Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on RailsA Toda Maquina Con Ruby on Rails
A Toda Maquina Con Ruby on Rails
 

Viewers also liked

Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
Ahmed Assaf
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
Christian Joudrey
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
Sreenivas Kappala
 
Building Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JSBuilding Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JS
Lohith Goudagere Nagaraj
 
Node-IL Meetup 12/2
Node-IL Meetup 12/2Node-IL Meetup 12/2
Node-IL Meetup 12/2
Ynon Perek
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongoose
Fin Chen
 
Introduction to Cloud Computing with AWS
Introduction to Cloud Computing with AWSIntroduction to Cloud Computing with AWS
Introduction to Cloud Computing with AWSEdureka!
 
Mongoose getting started-Mongo Db with Node js
Mongoose getting started-Mongo Db with Node jsMongoose getting started-Mongo Db with Node js
Mongoose getting started-Mongo Db with Node js
Pallavi Srivastava
 
Getting Started With MongoDB and Mongoose
Getting Started With MongoDB and MongooseGetting Started With MongoDB and Mongoose
Getting Started With MongoDB and Mongoose
Ynon Perek
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Dinh Pham
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
fakedarren
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
PHP Support
 
Introduction to Node.JS Express
Introduction to Node.JS ExpressIntroduction to Node.JS Express
Introduction to Node.JS Express
Eueung Mulyana
 
EAIESB TIBCO EXPERTISE
EAIESB TIBCO EXPERTISEEAIESB TIBCO EXPERTISE
EAIESB TIBCO EXPERTISE
Vijay Reddy
 
Express JS
Express JSExpress JS
Express JS
Alok Guha
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_PresentationArpita Patel
 

Viewers also liked (20)

Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
 
Express js
Express jsExpress js
Express js
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
Express yourself
Express yourselfExpress yourself
Express yourself
 
Building Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JSBuilding Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JS
 
Node.js
Node.jsNode.js
Node.js
 
Node-IL Meetup 12/2
Node-IL Meetup 12/2Node-IL Meetup 12/2
Node-IL Meetup 12/2
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongoose
 
Introduction to Cloud Computing with AWS
Introduction to Cloud Computing with AWSIntroduction to Cloud Computing with AWS
Introduction to Cloud Computing with AWS
 
Mongoose getting started-Mongo Db with Node js
Mongoose getting started-Mongo Db with Node jsMongoose getting started-Mongo Db with Node js
Mongoose getting started-Mongo Db with Node js
 
Getting Started With MongoDB and Mongoose
Getting Started With MongoDB and MongooseGetting Started With MongoDB and Mongoose
Getting Started With MongoDB and Mongoose
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
Introduction to Node.JS Express
Introduction to Node.JS ExpressIntroduction to Node.JS Express
Introduction to Node.JS Express
 
EAIESB TIBCO EXPERTISE
EAIESB TIBCO EXPERTISEEAIESB TIBCO EXPERTISE
EAIESB TIBCO EXPERTISE
 
Express JS
Express JSExpress JS
Express JS
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_Presentation
 

Similar to Node JS Express : Steps to Create Restful Web App

Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
Edureka!
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
Edureka!
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
Nodejs
NodejsNodejs
Nodejs
dssprakash
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
David Ashton
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
Ahmed Assaf
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developerEdureka!
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
Edureka!
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
NodeXperts
 
Create ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm packageCreate ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm package
Andrii Lundiak
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
sanskriti agarwal
 
Nodejs
NodejsNodejs
Treinamento frontend
Treinamento frontendTreinamento frontend
Treinamento frontend
Adrian Caetano
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introduction
cNguyn826690
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
shereefsakr
 
Writing native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScriptWriting native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScript
Igalia
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
Ahmed Elbassel
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Michael Lange
 

Similar to Node JS Express : Steps to Create Restful Web App (20)

Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Nodejs
NodejsNodejs
Nodejs
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
 
Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Create ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm packageCreate ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm package
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Nodejs
NodejsNodejs
Nodejs
 
Treinamento frontend
Treinamento frontendTreinamento frontend
Treinamento frontend
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introduction
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Writing native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScriptWriting native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScript
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 

More from Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

Node JS Express : Steps to Create Restful Web App

  • 1. www.edureka.co/mastering-node-js View Mastering Node.js course details at www.edureka.co/mastering-node-js For Queries during the session and class recording: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email us : sales@edureka.co Node JS Express - Steps to create Restful Web App
  • 2. Slide 2 www.edureka.co/mastering-node-jsSlide 2 The Importance or Reason for this Course Node.js is a platform for building high performance, event-driven, real-time and scalable networking applications just using javascript. You will receive hands-on training in Node.js, building networking and web based applications that are far superior and efficient than your regular languages. And the best part : It's all in Javascript – on the server or on the client – Javascript Everywhere! This course is designed to help you learn this amazing platform with great ease, with the help of hands-on training, code snippets, live sessions and expert support.
  • 3. Slide 3 www.edureka.co/mastering-node-jsSlide 3 Demand for this Course Javascript is an ubiquitous language known by millions of developers worldwide. When using Node.js, Javascript becomes a fully-functional server side programming language that is well suited for making real-time business apps and APIs More and more employers & entrepreneurs are switching their technologies to Node.js Cases in point : Walmart, Paypal/Ebay, Microsoft, LinkedIn, Yahoo, Yammer (Now part of Microsoft) and the list is never ending.
  • 4. Slide 4 www.edureka.co/mastering-node-jsSlide 4 Job Trends Salaries for Node.js Developers are already in the $60,000 range and much more. From the graph below : The number of jobs are skyrocketing.
  • 5. Slide 5 www.edureka.co/mastering-node-js LIVE Online Class Class Recording in LMS 24/7 Post Class Support Module Wise Quiz Project Work Verifiable Certificate Course Features
  • 6. Slide 6 www.edureka.co/mastering-node-js Objectives At the end of the session you will be able to learn: Nodejs express Creating Restful Web App NPM Templates in Express
  • 7. Slide 7 www.edureka.co/mastering-node-jsSlide 7 What is Node.js ? It is an Open-Source, Cross-Platform runtime environment for networking applications It is built on top of Google Chrome’s JavaScript Runtime : V8 This lets us build fast, highly scalable networking applications just using JavaScript It is an Asynchronous Event driven framework Guess What ? » IT’s SINGLE THREADED !! » No worries about : race conditions, deadlocks and other problems that go with multi-threading. » “Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop scalable systems.” - (courtesy : nodejs.org)
  • 8. Slide 8 www.edureka.co/mastering-node-jsSlide 8 What is Node.js ? Node.js is Event Driven. Uses the Event Emitter model Just because Node.js is Single Threaded does not mean you can’t have multiple cores in your application. We can fork or spawn child processes from the main node process any time » This lets us even fire shell commands or even start up another Application straight from your Node.js Application
  • 9. Slide 9 www.edureka.co/mastering-node-jsSlide 9 Your First Node.js Program Thats right : since we deal with good ol’ Javascript. Lets write our first program : function yooohoooWorld() { console.log(‘Yooddleeeyodleeyodleeeeooooo World!!!’); } yooohoooWorld(); Copy that onto a new file and save it with a “.js” extension Go to command line, cd to the folder with that file and run : node example.js In fact, Node.js comes with an REPL (Read-Eval-Print-Loop) : a simple command line tool to interactively run Javascript and see the results. Just type “node” on the command line and hit enter
  • 10. Slide 10 www.edureka.co/mastering-node-jsSlide 10 Basics of Node.js : npm npm used to stand for Node Package Manager. Now it stands for nothing. Its actually not an acronym. npm is not a Node.js specific tool any more npm is a registry of reusable modules and packages written by various developers » Yes, you can publish your own npm packages There are two ways to install npm packages : » Locally : To use and depend on the package from your own module or project » Globally : To use across the system, like a command line tool Installing a package locally : » The package is easily downloaded by just saying npm install <packagename> » This will create a node_modules directory (if it does not exist yet) and will download the package there » Once installed you can use it in any js file of your project by saying » var obj = require(‘packagename’);
  • 11. Slide 11 www.edureka.co/mastering-node-jsSlide 11 Basics of Node.js : npm Tip: Next time you want to clone or copy your project to another server, just copy the code you wrote and the package.json file. Then run npm install on that server Installing a package locally ...contd. : » Another way to save packages locally is by using a package.json file. » Advantage > ? » Once you have a package.json file in your directory, and you run npm install, all package names listed in there are downloaded » Thats really cool. Because now, your build is “reproducible” » package.json : { "name": "demo-app", "version": "1.0.0" } » Then npm install --save <packagename>. This adds the package name to the package.json
  • 12. Slide 12 www.edureka.co/mastering-node-jsSlide 12 Basics of Node.js : npm Installing a package locally ...contd. : You can also manually enter the name of the package and the version number to your package.json file like so : { "name": "demo-app", "version": "1.0.0", "dependencies": { "packagename": "^2.4.1" } }
  • 13. Slide 13 www.edureka.co/mastering-node-jsSlide 13 To install an npm package globally : just run npm install -g <packagename> To update or uninstall a globally installed package, just run npm update or npm uninstall with the -g option Basics of Node.js : npm Tip: Most often when globally installing a package you would need root access : → On Windows the following command will open the Command Line as Administrator
  • 14. Slide 14 www.edureka.co/mastering-node-jsSlide 14 Basics of Node.js : npm → Tip: Most often when globally installing a package you would need root access : » Another alternative for Windows which will come in handy is installing some other Command Line alternative like Console2 (http://sourceforge.net/projects/console/) or ConEmu (http://www.fosshub.com/ConEmu.html) , etc. » For Linux/Unix/Mac : sudo npm install -g <packagename>
  • 15. Slide 15 www.edureka.co/mastering-node-jsSlide 15 Express JS Express JS : Web Framework for Node.js. It is an npm package To install : npm install express //in the main project folder Express JS also provides a tool to create a simple folder structure for your app : express-generator : npm install express-generator -g //To be installed globally » Now, saying express newapp will create a project called newapp in the current working directory along with a simple folder structure. » The dependencies will then be installed by doing a cd newapp and then npm install » To run the app » node ./bin/www // This is where the server is run and listening on a port
  • 16. Slide 16 www.edureka.co/mastering-node-jsSlide 16 Express JS : Templates By default Express supports the Jade Template Engine for the HTML Views. What is an Javascript Template Engine : it is a framework to help bind data to your HTML views Why do you need one ? » Helps you easily bind data from the back end with the HTML view » Helps in bundling HTML code into reusable modules/layouts » Adds basic conditionals & iterations / loops to your HTML. HTML does not support “If -Else” or “for” loops. Many Javascript Template Engines are available : Jade, Handlebars, Hogan, EJS, etc.
  • 17. Slide 17 www.edureka.co/mastering-node-jsSlide 17 Express JS : Templates To use the default Jade template engine continue as described before To use Handlebars, express --hbs newapp To use Hogan, express -H newapp or express --hogan newapp To use EJS, express -e newapp or express --ejs newapp If you want to use a css engine like stylus or less add the following option : --css <engine> where <engine> can be less or stylus or compass You can use the --force or -f option to force the express generator on a non-empty directory
  • 18. Slide 18 www.edureka.co/mastering-node-jsSlide 18 Express JS : Jade Jade is a simple Javascript Template engine for writing HTML. No config has to be set up for ExpressJS since it is the default view engine However, Jade has a different syntax as compared to HTML, may not preferred by some developers. Example of Jade syntax : JADE html head title My App Title body h1= pageHeaderVar div.className p. some content HTML <html> <head> <title> My App Title </title> </head> <body> <h1>Page Header</h1> <div class=”className”> <p> some content </p> </div> </body> </html>
  • 19. Slide 19 www.edureka.co/mastering-node-jsSlide 19 Express JS : Handlebars Handlebars is a Javascript Template Engine having a much more simple HTML like syntax. Actually Handlebars templates are HTML with a few added operators and some javascript functions available for use. To use Handlebars in Express JS, we use the “hbs” npm package which is a simple wrapper for Handlebars.js. To use this as the view engine in place of Jade, we first have to npm install hbs if you have not already used the express-generator’s --hbs option to express command. Set view engine in app.js to app.set(‘view-engine’,’hbs’) For the most part, Handlebars is nothing but HTML, intermingled with Handlebar Expressions. A Handlebar Expression is, {{ with some expression/variable or content followed by }}.
  • 20. Slide 20 www.edureka.co/mastering-node-jsSlide 20 Express JS : Handlebars So if a Handlebar template is being rendered and an object, {greeting: “Hello World”, subgreeting: “Hey folks I’m using HBS”} is passed to it, the handlebar syntax will look something like this : //- index.hbs <div> <h1>{{greeting}}</h1> <h5>{{subgreeting}}</h5> </div> //After Rendering : <div> <h1>Hello World</h1> <h5>Hey folks I’m using HBS</h5> </div>
  • 21. Slide 21 www.edureka.co/mastering-node-jsSlide 21 Express JS : A Simple Express Application var express = require(‘express’); var app = express(); app.get(‘/’,function(req,res){ res.send(‘Hello World !!”); }) app.listen(3000,function(){ console.log(‘Express Server listening on port 3000); })
  • 23. Slide 23 www.edureka.co/mastering-node-js Course Topics → Module 7 » Forks, Spawns and the Process Module → Module 8 » Testing in Node.js → Module 9 » Node.js in the Tech World → Module 1 » Introduction to Objects in Javascript & Node.js → Module 2 » Modules / Packages → Module 3 » Events & Streams → Module 4 » Network Communication & Web Technology in Node.js → Module 5 » Building a Web Application → Module 6 » Real-time Communication