Created
January 18, 2017 14:42
-
-
Save tecnocrata/588682708b6dbfda51953460b0a29f0d to your computer and use it in GitHub Desktop.
Simple Nodejs web app
This file contains hidden or 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
| const http = require('http'); | |
| const handleRequest = (request, response) => { | |
| console.log('Received request for URL: ' + request.url); | |
| response.writeHead(200); | |
| response.end('Hello World!'); | |
| }; | |
| const www = http.createServer(handleRequest); | |
| www.listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment