Skip to content

Instantly share code, notes, and snippets.

@raduGaspar
Created March 18, 2018 12:10
Show Gist options
  • Save raduGaspar/b2aa098c1d5f5ffd2297b30a424f2dfd to your computer and use it in GitHub Desktop.
Save raduGaspar/b2aa098c1d5f5ffd2297b30a424f2dfd to your computer and use it in GitHub Desktop.
Barebones NodeJS Server
const http = require('http')
const port = process.env.PORT || 3001
http.createServer((req, res) => {
res.write('Hello World!')
res.end()
}).listen(port, () => {
console.log(`server start at port ${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment