Basic features on Node

In notebook:
FrontEndMasters Building Web Apps with Node.js
Created at:
2015-10-04
Updated:
2017-09-16
Tags:
backend Node JS JavaScript Fundamentals
https://frontendmasters.com/courses/building-web-apps-with-node-js/#v=yapzwma9x9&skip=1Interactive mode
  $ node
then you can play with some codeStandard libraries

  • async by default - passing callbacks (e.g. an http request is completed)
  • low level (higher level abstractions are provided by the community)
  • http is first class citizen (the "hello world" of Node)
A hello world example (note: without third-party libs)
  var http = require("http");

http.createServer(function(request, response){
    response.writeHead(200, {
        "Content-Type":"text/plain"
    });
    response.end("hello world");
}).listen(3000)
httpServer is part of the core