SlideShare a Scribd company logo
Introduction to Node.js
Step 1
• Install Node.js
• Go to https://nodejs.org/en/
• Hit->
What is Node
• Node.js is a JavaScript runtime built on Chrome's V8
JavaScript engine.
• Node.js applications are written in JavaScript and can be run
within the Node.js runtime
Step 1 verification
• Open Command Prompt/terminal
• type “node -v”
• You should see “v4.1.1”
Step 2
• Create a Simple Server
• Create file “index.js” copy code
• run “node index.js”
Step 2 verification
• Open “http://127.0.0.1:1337/“ in browser
• You should see “Hello World”
Step 2a
• Instead of Hello World, write something else.
Step 2b
• Download ngrok -> https://ngrok.com/
• run ngrok 1337
• Go to Forwarding URL
Step 3 Express
• Go to http://expressjs.com/
Step 3 Express
• Go to http://expressjs.com/
• Copy code to index.js
• run “npm install express”
• run “node index.js”
• Open Browser- > “localhost:3000”
Step 3 verification
• Open Browser- > “localhost:3000”
• You should see “Hello World”
Step 3 more
• Try to create another route
• e.g.
• Browser ->“localhost:3000/Justin” should display
“Hello Justin”
Step 4 Query String
app.get('/print', function (req, res) {
res.send(req.query);
});
Step 4 Query String
• A query string is the part of a uniform resource
locator (URL) containing data that does not fit
conveniently into a hierarchical path structure
• Browser ->
“http://localhost:3000/print?Name=Justin”
Step 4a) Query String
Try to print just the Name
Step 4 Query String
app.get('/print', function (req, res) {
res.send(req.query);
res.send(req.query.Name);
});
Step 5
Consume an API
• Browser-> “http://ppd.io/htp”
• Download Zip
• run “npm install”
• run “node app.js”

More Related Content

What's hot

Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.jsJitendra Zaa
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaNurul Ferdous
 
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) platformSreenivas Kappala
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful APISang Cù
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don'tF5 Buddy
 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSVitor Casadei
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with FayeMatjaž Lipuš
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1Bhavin Shah
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of dockerPHP Indonesia
 
Node.js - Introduction and role in Frontend Development
Node.js - Introduction and role in Frontend DevelopmentNode.js - Introduction and role in Frontend Development
Node.js - Introduction and role in Frontend DevelopmentJulián David Duque
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June MeetupValeri Karpov
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJSJITENDRA KUMAR PATEL
 

What's hot (20)

Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.js
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
Getting started with node.js
Getting started with node.jsGetting started with node.js
Getting started with node.js
 
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
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Node intro
Node introNode intro
Node intro
 
MongoDB + Node.JS + EPAM ROAD
MongoDB + Node.JS + EPAM ROADMongoDB + Node.JS + EPAM ROAD
MongoDB + Node.JS + EPAM ROAD
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJS
 
Node.JS and WebSockets with Faye
Node.JS and WebSockets with FayeNode.JS and WebSockets with Faye
Node.JS and WebSockets with Faye
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
Node.js on Azure
Node.js on AzureNode.js on Azure
Node.js on Azure
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of docker
 
Node.js - Introduction and role in Frontend Development
Node.js - Introduction and role in Frontend DevelopmentNode.js - Introduction and role in Frontend Development
Node.js - Introduction and role in Frontend Development
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Node.js Basics
Node.js Basics Node.js Basics
Node.js Basics
 

Viewers also liked

Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsDerek Anderson
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsTroy Miles
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsShiju Varghese
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Steganography - The art of hiding data
Steganography - The art of hiding dataSteganography - The art of hiding data
Steganography - The art of hiding dataSarin Thapa
 
Steganography
Steganography Steganography
Steganography Uttam Jain
 
Steganography presentation
Steganography presentationSteganography presentation
Steganography presentationAshwin Prasad
 

Viewers also liked (13)

Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Nodejs vatsal shah
Nodejs vatsal shahNodejs vatsal shah
Nodejs vatsal shah
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
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
 
Steganography - The art of hiding data
Steganography - The art of hiding dataSteganography - The art of hiding data
Steganography - The art of hiding data
 
Steganography
SteganographySteganography
Steganography
 
Steganography
Steganography Steganography
Steganography
 
Steganography presentation
Steganography presentationSteganography presentation
Steganography presentation
 
PPT steganography
PPT steganographyPPT steganography
PPT steganography
 

Similar to Introduction to node

node_js.pptx
node_js.pptxnode_js.pptx
node_js.pptxdipen55
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jibanJibanananda Sana
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.jsKhalid Farhan
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.jsPrabin Silwal
 
Node.js for .NET Developers
Node.js for .NET DevelopersNode.js for .NET Developers
Node.js for .NET DevelopersDavid Neal
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS Ganesh Kondal
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedPaul Withers
 
Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)David Neal
 
Azure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAzure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAndrea Walker
 
DevOps <3 node.js
DevOps <3 node.jsDevOps <3 node.js
DevOps <3 node.jsJeff Miccolis
 
Bringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationBringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationAcquia
 
Developing Client-side Application using Visual Studio Code and Nodejs
Developing Client-side Application using Visual Studio Code and NodejsDeveloping Client-side Application using Visual Studio Code and Nodejs
Developing Client-side Application using Visual Studio Code and NodejsRajesh Gunasundaram
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
 
Let's run JavaScript Everywhere
Let's run JavaScript EverywhereLet's run JavaScript Everywhere
Let's run JavaScript EverywhereTom Croucher
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An IntroductionNirvanic Labs
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JSbrendankowitz
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 

Similar to Introduction to node (20)

node_js.pptx
node_js.pptxnode_js.pptx
node_js.pptx
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.js
 
Node.js
Node.jsNode.js
Node.js
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Node.js for .NET Developers
Node.js for .NET DevelopersNode.js for .NET Developers
Node.js for .NET Developers
 
nodecalgary1
nodecalgary1nodecalgary1
nodecalgary1
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)
 
Azure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAzure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentation
 
DevOps <3 node.js
DevOps <3 node.jsDevOps <3 node.js
DevOps <3 node.js
 
Bringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js IntegrationBringing Interactivity to Your Drupal Site with Node.js Integration
Bringing Interactivity to Your Drupal Site with Node.js Integration
 
Developing Client-side Application using Visual Studio Code and Nodejs
Developing Client-side Application using Visual Studio Code and NodejsDeveloping Client-side Application using Visual Studio Code and Nodejs
Developing Client-side Application using Visual Studio Code and Nodejs
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
Let's run JavaScript Everywhere
Let's run JavaScript EverywhereLet's run JavaScript Everywhere
Let's run JavaScript Everywhere
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An Introduction
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 

More from Justin Woo

Cracking Mobile Commerce
Cracking Mobile CommerceCracking Mobile Commerce
Cracking Mobile CommerceJustin Woo
 
Spark conference
Spark conferenceSpark conference
Spark conferenceJustin Woo
 
ConvergeSE - Making Credit Card Forms Beautiful
ConvergeSE - Making Credit Card Forms BeautifulConvergeSE - Making Credit Card Forms Beautiful
ConvergeSE - Making Credit Card Forms BeautifulJustin Woo
 
Confoo - Making Payments Fun
Confoo - Making Payments FunConfoo - Making Payments Fun
Confoo - Making Payments FunJustin Woo
 
LA Mobile Camp
LA Mobile CampLA Mobile Camp
LA Mobile CampJustin Woo
 
Prodconf - A Credit Card Form walks into a Bar
Prodconf - A Credit Card Form walks into a BarProdconf - A Credit Card Form walks into a Bar
Prodconf - A Credit Card Form walks into a BarJustin Woo
 

More from Justin Woo (7)

Cracking Mobile Commerce
Cracking Mobile CommerceCracking Mobile Commerce
Cracking Mobile Commerce
 
Spark conference
Spark conferenceSpark conference
Spark conference
 
ConvergeSE - Making Credit Card Forms Beautiful
ConvergeSE - Making Credit Card Forms BeautifulConvergeSE - Making Credit Card Forms Beautiful
ConvergeSE - Making Credit Card Forms Beautiful
 
Mrc 2015
Mrc 2015Mrc 2015
Mrc 2015
 
Confoo - Making Payments Fun
Confoo - Making Payments FunConfoo - Making Payments Fun
Confoo - Making Payments Fun
 
LA Mobile Camp
LA Mobile CampLA Mobile Camp
LA Mobile Camp
 
Prodconf - A Credit Card Form walks into a Bar
Prodconf - A Credit Card Form walks into a BarProdconf - A Credit Card Form walks into a Bar
Prodconf - A Credit Card Form walks into a Bar
 

Recently uploaded

The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...awaisafdar
 
Unveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdfUnveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdfSam H
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111zoyaansari11365
 
Global Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfGlobal Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfHenry Tapper
 
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-indiafalcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-indiaFalcon Invoice Discounting
 
Business Valuation Principles for Entrepreneurs
Business Valuation Principles for EntrepreneursBusiness Valuation Principles for Entrepreneurs
Business Valuation Principles for EntrepreneursBen Wann
 
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...Björn Rohles
 
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...PaulBryant58
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small businessBen Wann
 
lecture 02 managerial accounting. chapter 02pptx
lecture 02 managerial accounting. chapter 02pptxlecture 02 managerial accounting. chapter 02pptx
lecture 02 managerial accounting. chapter 02pptxalshamahimohammed1
 
Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.smalmahmud11
 
chapter 10 - excise tax of transfer and business taxation
chapter 10 - excise tax of transfer and business taxationchapter 10 - excise tax of transfer and business taxation
chapter 10 - excise tax of transfer and business taxationAUDIJEAngelo
 
Get Bad Credit Loans with Guaranteed Approval
Get Bad Credit Loans with Guaranteed ApprovalGet Bad Credit Loans with Guaranteed Approval
Get Bad Credit Loans with Guaranteed ApprovalDollarLoan Hub
 
anas about venice for grade 6f about venice
anas about venice for grade 6f about veniceanas about venice for grade 6f about venice
anas about venice for grade 6f about veniceanasabutalha2013
 
Lookback Analysis
Lookback AnalysisLookback Analysis
Lookback AnalysisSafe PaaS
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxCynthia Clay
 
IPTV Subscription UK: Your Guide to Choosing the Best Service
IPTV Subscription UK: Your Guide to Choosing the Best ServiceIPTV Subscription UK: Your Guide to Choosing the Best Service
IPTV Subscription UK: Your Guide to Choosing the Best ServiceDragon Dream Bar
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airportmarketingjdass
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographerofm712785
 
Using Generative AI for Content Marketing
Using Generative AI for Content MarketingUsing Generative AI for Content Marketing
Using Generative AI for Content MarketingChuck Aikens
 

Recently uploaded (20)

The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...The Parable of the Pipeline a book every new businessman or business student ...
The Parable of the Pipeline a book every new businessman or business student ...
 
Unveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdfUnveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdf
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111
 
Global Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfGlobal Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdf
 
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-indiafalcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
 
Business Valuation Principles for Entrepreneurs
Business Valuation Principles for EntrepreneursBusiness Valuation Principles for Entrepreneurs
Business Valuation Principles for Entrepreneurs
 
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...
Meaningful Technology for Humans: How Strategy Helps to Deliver Real Value fo...
 
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small business
 
lecture 02 managerial accounting. chapter 02pptx
lecture 02 managerial accounting. chapter 02pptxlecture 02 managerial accounting. chapter 02pptx
lecture 02 managerial accounting. chapter 02pptx
 
Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.
 
chapter 10 - excise tax of transfer and business taxation
chapter 10 - excise tax of transfer and business taxationchapter 10 - excise tax of transfer and business taxation
chapter 10 - excise tax of transfer and business taxation
 
Get Bad Credit Loans with Guaranteed Approval
Get Bad Credit Loans with Guaranteed ApprovalGet Bad Credit Loans with Guaranteed Approval
Get Bad Credit Loans with Guaranteed Approval
 
anas about venice for grade 6f about venice
anas about venice for grade 6f about veniceanas about venice for grade 6f about venice
anas about venice for grade 6f about venice
 
Lookback Analysis
Lookback AnalysisLookback Analysis
Lookback Analysis
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
IPTV Subscription UK: Your Guide to Choosing the Best Service
IPTV Subscription UK: Your Guide to Choosing the Best ServiceIPTV Subscription UK: Your Guide to Choosing the Best Service
IPTV Subscription UK: Your Guide to Choosing the Best Service
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airport
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer
 
Using Generative AI for Content Marketing
Using Generative AI for Content MarketingUsing Generative AI for Content Marketing
Using Generative AI for Content Marketing
 

Introduction to node

  • 2. Step 1 • Install Node.js • Go to https://nodejs.org/en/ • Hit->
  • 3. What is Node • Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. • Node.js applications are written in JavaScript and can be run within the Node.js runtime
  • 4. Step 1 verification • Open Command Prompt/terminal • type “node -v” • You should see “v4.1.1”
  • 5. Step 2 • Create a Simple Server • Create file “index.js” copy code • run “node index.js”
  • 6. Step 2 verification • Open “http://127.0.0.1:1337/“ in browser • You should see “Hello World”
  • 7. Step 2a • Instead of Hello World, write something else.
  • 8. Step 2b • Download ngrok -> https://ngrok.com/ • run ngrok 1337 • Go to Forwarding URL
  • 9. Step 3 Express • Go to http://expressjs.com/
  • 10. Step 3 Express • Go to http://expressjs.com/
  • 11. • Copy code to index.js • run “npm install express” • run “node index.js” • Open Browser- > “localhost:3000”
  • 12. Step 3 verification • Open Browser- > “localhost:3000” • You should see “Hello World”
  • 13. Step 3 more • Try to create another route • e.g. • Browser ->“localhost:3000/Justin” should display “Hello Justin”
  • 14. Step 4 Query String app.get('/print', function (req, res) { res.send(req.query); });
  • 15. Step 4 Query String • A query string is the part of a uniform resource locator (URL) containing data that does not fit conveniently into a hierarchical path structure • Browser -> “http://localhost:3000/print?Name=Justin”
  • 16. Step 4a) Query String Try to print just the Name
  • 17. Step 4 Query String app.get('/print', function (req, res) { res.send(req.query); res.send(req.query.Name); });
  • 18. Step 5 Consume an API • Browser-> “http://ppd.io/htp” • Download Zip • run “npm install” • run “node app.js”