JavaScript Programming: Pushing the Limits by Jon Raasch

JavaScript Programming: Pushing the Limits by Jon Raasch

Author:Jon Raasch
Language: eng
Format: mobi, pdf
Publisher: Wiley Publishing
Published: 2013-07-14T16:00:00+00:00


If you want to manage multiple Node versions on the same system, install NVM: https://github.com/creationix/nvm.

Getting Started with Node

Although Node might seem intimidating at first, getting started is actually pretty easy. No intro to Node would be complete without the ubiquitous “Hello World” example, and I'm just as excited as you are.

Creating the Server

The first step is to open up a text editor and include the http module, which you use to create the HTTP server:

// load http module

var http = require('http');

Here you use the require() method to include the module. The http module is one of the core Node modules. (Later this chapter you learn more about modules and how to include external modules in your app.) Next, use the http module to create the server:

// load http module

var http = require('http');



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.