Skip to content

Instantly share code, notes, and snippets.

@harsh4870
Last active January 9, 2018 13:52
Show Gist options
  • Save harsh4870/01e8da491960669f101e21d02d18c1c7 to your computer and use it in GitHub Desktop.
Save harsh4870/01e8da491960669f101e21d02d18c1c7 to your computer and use it in GitHub Desktop.
simple node js server
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(8081);
@harsh4870
Copy link
Author

simple node.js server for beginners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment