Created
November 22, 2015 17:59
-
-
Save merlindorin/3c1581a0499a21b6aefa to your computer and use it in GitHub Desktop.
Serveur Http Simple
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
#!/usr/bin/env node | |
var http = require('http'); | |
const PORT=8080; | |
function requestListener(request, response){ | |
response.end('Hello World'); | |
} | |
var server = http.createServer(requestListener); | |
server.listen(PORT, function(){ | |
console.log("Server listening on `http://localhost:%s`", PORT); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment