Created
January 8, 2016 10:13
-
-
Save reynish/7ec33c4eb81b1d198577 to your computer and use it in GitHub Desktop.
Really simple node server
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
| var http = require('http'); | |
| var port = 9000; | |
| function handleRequest(req, res){ | |
| res.end('I\'m alive'); | |
| } | |
| var server = http.createServer(handleRequest); | |
| server.listen(port, function(){ | |
| console.log('Server is running on http://reynishpi:'+ port); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment