Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
require('server-base')({
'@setup' (ctx) {
ctx.middlewareFunctions = []
},
'/': {
get (req, res) {
res.setHeader('content-type', 'application/json; charset=utf-8')
res.json({ hello: 'world' })
}
}
}).start(3000)