Skip to content

Instantly share code, notes, and snippets.

@maishsk
Last active January 8, 2019 15:37
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 maishsk/e78fa2924ea612a8fa4b83c6f3b82aef to your computer and use it in GitHub Desktop.
Save maishsk/e78fa2924ea612a8fa4b83c6f3b82aef to your computer and use it in GitHub Desktop.
simple webserver
const express = require('express')
const app = express()
const port = 3000
app.get('/hello', (request, response) => {
response.send('Hello from Express!')
})
app.listen(port, (err) => {
if (err) {
return console.log('something bad happened', err)
}
console.log(`server is listening on ${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment