Skip to content

Instantly share code, notes, and snippets.

@merlindorin
Created November 22, 2015 17:59
Show Gist options
  • Save merlindorin/3c1581a0499a21b6aefa to your computer and use it in GitHub Desktop.
Save merlindorin/3c1581a0499a21b6aefa to your computer and use it in GitHub Desktop.
Serveur Http Simple
#!/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