Skip to content

Instantly share code, notes, and snippets.

@JoeKarlsson
Created October 6, 2016 19:19
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 JoeKarlsson/8bddbbc0ada1715d5744a08efc0ed1ce to your computer and use it in GitHub Desktop.
Save JoeKarlsson/8bddbbc0ada1715d5744a08efc0ed1ce to your computer and use it in GitHub Desktop.
Live Coding Demo for the HTTP Node Module
'use strict'
const http = require('http');
const PORT = 3000;
http.createServer(( request, response ) => {
console.log('request: ', request.url);
console.log('request: ', request.method);
//resonse head OK
response.writeHead(200, {
'Keep-Alive' : 'true',
'JozHere' : 'true'
});
response.end('Hello Client');
}).listen(PORT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment