Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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