Skip to content

Instantly share code, notes, and snippets.

@thigm85
Created January 20, 2016 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thigm85/f2f6d430b00e88e24d95 to your computer and use it in GitHub Desktop.
Save thigm85/f2f6d430b00e88e24d95 to your computer and use it in GitHub Desktop.
A minimal node.js application
var http = require("http");
http.createServer(function (request, response) {
// Send the HTTP header
// HTTP Status: 200 : OK
// Content Type: text/plain
response.writeHead(200, {'Content-Type': 'text/plain'});
// Send the response body as "Hello World"
response.end('Hello World\n');
}).listen(7273);
// Console will print the message
console.log('Server running at http://127.0.0.1:7273/');
// Open browser using http://127.0.0.1:7273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment