Created
April 21, 2017 03:00
-
-
Save azat-co/41b7abc276eb0a773696c3c8d757e87e to your computer and use it in GitHub Desktop.
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
const port = process.env.PORT || 3000 | |
require('http') | |
.createServer((req, res) => { | |
console.log('url:', req.url) | |
res.end('hello world') | |
}) | |
.listen(port, (error)=>{ | |
console.log(`server is running on ${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment