Created
October 6, 2016 19:19
-
-
Save JoeKarlsson/8bddbbc0ada1715d5744a08efc0ed1ce to your computer and use it in GitHub Desktop.
Live Coding Demo for the HTTP Node Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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