Skip to content

Instantly share code, notes, and snippets.

@azat-co
Created April 21, 2017 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azat-co/41b7abc276eb0a773696c3c8d757e87e to your computer and use it in GitHub Desktop.
Save azat-co/41b7abc276eb0a773696c3c8d757e87e to your computer and use it in GitHub Desktop.
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