KEMBAR78
Getting started with node.js
Getting Started with Node.js
Building a Hello Node.js application
What is Node ?
➢Javascripts on your server
➢Uses V8 engine
➢Program just like the Client
➢Node adds some unique JS features
Some Unique Features
➢Event Driven
➢Non-blocking
➢Two way connection
➢Real time applications
➢Used by Paypal , Walmart and Groupon
NodeJS Challenges
➢Doesn't run on traditional servers
➢Advance javascript
➢Lots of dev install
➢A very concise API(Library)
➢Is not really for creating websites
Building a Hello Node.js application
➔First thing we to do to import module
➔Http module
var http = require('http');
➔Creat a server
var myServer =
http.createServer(function(request,
response) {});
Building a Hello Node.js application
➔Create server request listen
myServer.listen(3000);
➔Save file go to cmd
➔Run it
Building a Hello Node.js application
var http = require('http'); //add the http module
var myServer = http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type" : "text/plain"});
response.write("Hello");
response.end();
}); //create a server
myServer.listen(3000);
What is Next ?
★ Understanding callback execution in the
event loop
★ Understanding require() and modules
★ Node Packaged Modules (NPM)
★ Modules
★ nodeJS in sense of php
About Me
Mudassar Ali | Senior Software Engineer
E Mail: sahil_bwp@yahoo.com
Twitter : SahilBabu106
Skype: sahil_babu
LinkedIn: pk.linkedin.com/in/sahilbabu
GitHub : github.com/sahilbabu
Stack Overflow:
stackoverflow.com/users/2809781/mudassar-ali-sahil

Getting started with node.js

  • 1.
    Getting Started withNode.js Building a Hello Node.js application
  • 2.
    What is Node? ➢Javascripts on your server ➢Uses V8 engine ➢Program just like the Client ➢Node adds some unique JS features
  • 3.
    Some Unique Features ➢EventDriven ➢Non-blocking ➢Two way connection ➢Real time applications ➢Used by Paypal , Walmart and Groupon
  • 4.
    NodeJS Challenges ➢Doesn't runon traditional servers ➢Advance javascript ➢Lots of dev install ➢A very concise API(Library) ➢Is not really for creating websites
  • 5.
    Building a HelloNode.js application ➔First thing we to do to import module ➔Http module var http = require('http'); ➔Creat a server var myServer = http.createServer(function(request, response) {});
  • 6.
    Building a HelloNode.js application ➔Create server request listen myServer.listen(3000); ➔Save file go to cmd ➔Run it
  • 7.
    Building a HelloNode.js application var http = require('http'); //add the http module var myServer = http.createServer(function(request, response) { response.writeHead(200, {"Content-Type" : "text/plain"}); response.write("Hello"); response.end(); }); //create a server myServer.listen(3000);
  • 8.
    What is Next? ★ Understanding callback execution in the event loop ★ Understanding require() and modules ★ Node Packaged Modules (NPM) ★ Modules ★ nodeJS in sense of php
  • 9.
    About Me Mudassar Ali| Senior Software Engineer E Mail: sahil_bwp@yahoo.com Twitter : SahilBabu106 Skype: sahil_babu LinkedIn: pk.linkedin.com/in/sahilbabu GitHub : github.com/sahilbabu Stack Overflow: stackoverflow.com/users/2809781/mudassar-ali-sahil

Editor's Notes

  • #3 >windows , > location > document > global >require > module > process > console
  • #4 > Node can handle lot of connections simultaneously , chat’s multiplayer games, real time data streaming and much more
  • #5 > Heroku > modern javascripts concepts , objects, modules, functions and other >Its really handle server tasks ,