SlideShare a Scribd company logo
1 of 16
Download to read offline
www.edureka.co/mastering-node-js
View Mastering Node.js course details at www.edureka.co/mastering-node-js
Create Restful Web Application With Node.js
Express Framework
For Queries:
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
Slide 2 www.edureka.co/mastering-node-js
Objectives
At the end of the session you will be able to learn:
Introduction of Node.js
What is the use of NPM
Express framework in nodeJS
How to create a Web services
MongoDB configuration
Slide 3 www.edureka.co/mastering-node-js
What is Node.js ?
Node.js is an open source, cross-platform runtime environment for server-side and networking applications
Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft
Windows, Linux, FreeBSD, NonStop and IBM. -- Wikipedia
This is based on Google’s V8 JavaScript Engine
Slide 4 www.edureka.co/mastering-node-js
What is Node.js ? (Contd.)
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)
Event
Loop
Event
Queue
Thread Pool
file system
network
process
other
Slide 5 www.edureka.co/mastering-node-jsSlide 5Slide 5Slide 5
 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’);
Basics of Node.js: npm
Slide 6 www.edureka.co/mastering-node-js
Express Framework
 Express framework provides a robust set of features for web and mobile applications.
 Creating robust API is quick and easy
 It provides a thin layer of fundamental web application feature.
 It offers a simple way to get a server up and running.
 Features of Express Framework :
» Router
» Middleware
» Template Engines
» Error Handling
Slide 7 www.edureka.co/mastering-node-jsSlide 7
 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.
Express Framework
Slide 8 www.edureka.co/mastering-node-js
Creating RESTful API
REST API stands for Representational State Transfer
RESTful server dispatches only data for an end point and not a web page.
HTTP methods for RESTful Services:
» GET
» POST
» PUT
» DELETE
Slide 9 www.edureka.co/mastering-node-js
DEMO
Slide 10 www.edureka.co/mastering-node-js
Connecting MongoDB with Node
MongoDB has rapidly grown to become a popular database for web applications and is a perfect fit for Node.JS
applications
We have lot of third party modules to connect with MongoDB
» Mongoose
» MongoDB
» MongoClient
First we have to establish a connection between node app and MongoDB.
Once connection is established, fire the query to perform a CURD operation in DB
Slide 11 www.edureka.co/mastering-node-js
DEMO
Slide 12 www.edureka.co/mastering-node-jsSlide 12
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 13 www.edureka.co/mastering-node-js
Course Topics
→ Module 6
» Real-time Communication
→ 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
Slide 14 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 15 www.edureka.co/mastering-node-js
Questions
Slide 16 www.edureka.co/mastering-node-js

More Related Content

What's hot

High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)
Chang W. Doh
 

What's hot (20)

Vue presentation
Vue presentationVue presentation
Vue presentation
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
An Introduction to Vuejs
An Introduction to VuejsAn Introduction to Vuejs
An Introduction to Vuejs
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Frameworks in java
Frameworks in javaFrameworks in java
Frameworks in java
 
Vuex
VuexVuex
Vuex
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
 
Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010
 
Vue.js
Vue.jsVue.js
Vue.js
 

Viewers also liked

NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
David Wesst
 
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
 

Viewers also liked (20)

Express js
Express jsExpress js
Express js
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Diving into Node with Express and Mongo
Diving into Node with Express and MongoDiving into Node with Express and Mongo
Diving into Node with Express and Mongo
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
 
Expressjs basic to advance, power by Node.js
Expressjs basic to advance, power by Node.jsExpressjs basic to advance, power by Node.js
Expressjs basic to advance, power by Node.js
 
Express node js
Express node jsExpress node js
Express node js
 
MongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN StackMongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN Stack
 
NodeJS: the good parts? A skeptic’s view (devnexus2014)
NodeJS: the good parts? A skeptic’s view (devnexus2014)NodeJS: the good parts? A skeptic’s view (devnexus2014)
NodeJS: the good parts? A skeptic’s view (devnexus2014)
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
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
 
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
 
Express yourself
Express yourselfExpress yourself
Express yourself
 
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?
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
Testing NodeJS Security
Testing NodeJS SecurityTesting NodeJS Security
Testing NodeJS Security
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 

Similar to Create Restful Web Application With Node.js Express Framework

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!
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 
Node.js Web Development .pdf
Node.js Web Development .pdfNode.js Web Development .pdf
Node.js Web Development .pdf
Abanti Aazmin
 

Similar to Create Restful Web Application With Node.js Express Framework (20)

Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
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
 
Node js
Node jsNode js
Node js
 
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
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Nodejs
NodejsNodejs
Nodejs
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Node.js Web Development .pdf
Node.js Web Development .pdfNode.js Web Development .pdf
Node.js Web Development .pdf
 
Node js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsNode js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share ppts
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
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
 

More from 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Create Restful Web Application With Node.js Express Framework

  • 1. www.edureka.co/mastering-node-js View Mastering Node.js course details at www.edureka.co/mastering-node-js Create Restful Web Application With Node.js Express Framework For Queries: 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
  • 2. Slide 2 www.edureka.co/mastering-node-js Objectives At the end of the session you will be able to learn: Introduction of Node.js What is the use of NPM Express framework in nodeJS How to create a Web services MongoDB configuration
  • 3. Slide 3 www.edureka.co/mastering-node-js What is Node.js ? Node.js is an open source, cross-platform runtime environment for server-side and networking applications Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, Linux, FreeBSD, NonStop and IBM. -- Wikipedia This is based on Google’s V8 JavaScript Engine
  • 4. Slide 4 www.edureka.co/mastering-node-js What is Node.js ? (Contd.) 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) Event Loop Event Queue Thread Pool file system network process other
  • 5. Slide 5 www.edureka.co/mastering-node-jsSlide 5Slide 5Slide 5  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’); Basics of Node.js: npm
  • 6. Slide 6 www.edureka.co/mastering-node-js Express Framework  Express framework provides a robust set of features for web and mobile applications.  Creating robust API is quick and easy  It provides a thin layer of fundamental web application feature.  It offers a simple way to get a server up and running.  Features of Express Framework : » Router » Middleware » Template Engines » Error Handling
  • 7. Slide 7 www.edureka.co/mastering-node-jsSlide 7  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. Express Framework
  • 8. Slide 8 www.edureka.co/mastering-node-js Creating RESTful API REST API stands for Representational State Transfer RESTful server dispatches only data for an end point and not a web page. HTTP methods for RESTful Services: » GET » POST » PUT » DELETE
  • 10. Slide 10 www.edureka.co/mastering-node-js Connecting MongoDB with Node MongoDB has rapidly grown to become a popular database for web applications and is a perfect fit for Node.JS applications We have lot of third party modules to connect with MongoDB » Mongoose » MongoDB » MongoClient First we have to establish a connection between node app and MongoDB. Once connection is established, fire the query to perform a CURD operation in DB
  • 12. Slide 12 www.edureka.co/mastering-node-jsSlide 12 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.
  • 13. Slide 13 www.edureka.co/mastering-node-js Course Topics → Module 6 » Real-time Communication → 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
  • 14. Slide 14 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