Skip to content

Instantly share code, notes, and snippets.

@vickonrails
Last active January 23, 2018 12:19
Show Gist options
  • Select an option

  • Save vickonrails/e3bba6aaa3dcef0ba5268bd79d899b27 to your computer and use it in GitHub Desktop.

Select an option

Save vickonrails/e3bba6aaa3dcef0ba5268bd79d899b27 to your computer and use it in GitHub Desktop.
//server.js
const http = require('http'),
makeServer = function (request,response){
response.writeHead(200,{'Content-Type':'text/plain'});
response.write('Hello world');
response.end();
},
server = http.createServer(makeServer);
server.listen(3000,()=>{
console.log('Node server created at port 3000');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment