Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js

Avatar for Harish Harish
November 06, 2015

 Node.js

Avatar for Harish

Harish

November 06, 2015

Other Decks in Programming

Transcript

  1.  Key node.js features  Event Driven  Non-blocking 

    Two way connections  Real time applications   Node.js challenges  Doesn’t run on traditional servers ( like heroku)  Advanced JavaScript  Lots of dev installs  A very concise API  Is not really for creating websites
  2. Create simple node.js server Create a folder on your desktop

    name it Nodejs (could be anywhere) Create a javascript file called hello.js inside Nodejs folder Write following javascript code and save it. 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 there'); response.end(); });//create a server myServer.listen(3000); console.log("Go to http://localhost:3000 on your browser");