Simple HTTP Server in NodeJS

Node.js uses an event-driven, non-blocking model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devicesThis simple web server written in Node responds with “Hello World” for every request. To run the server, put the code into a file example.js and execute it with the node program from the command line.

var http = require('http');
http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello Worldn');
}).listen(1337, '');
console.log('Server running at');
System Administration
Initial Server Configuration & Setup on Debian
Programming Patterns
Getting Started with Version Control & GitHub
System Administration
Installing Nginx on Ubuntu 14.04 with Server Caching
There are currently no comments.

%d bloggers like this: