Skip to content

Instantly share code, notes, and snippets.

@kharandziuk
Created October 24, 2018 17:38
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 kharandziuk/4f4939791b6e873a5f82e9a743007629 to your computer and use it in GitHub Desktop.
Save kharandziuk/4f4939791b6e873a5f82e9a743007629 to your computer and use it in GitHub Desktop.
simple server with people enpoing
var debug = require('debug')('app')
const express = require('express')
const app = express()
const port = 3000
app.use(express.json())
app.post('/people', (req, res) => {
debug('call')
setTimeout(
() => res.status(201).json({status: 'created'}),
2000
)
})
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment