Skip to content

Supporting http.createServer hook

Choose a tag to compare

@jkyberneees jkyberneees released this 10 Oct 20:28
· 79 commits to master since this release

Added:

  • Support for http.createServerhook:
const http = require('http')
const service = require('restana')()

service.get('/hi', (req, res) => {
  res.send({
    msg: 'Hello World!'
  })
})

http.createServer(service).listen(3000, '0.0.0.0', function () {
  console.log('running')
})

Big Thanks to @schamberg97 for this contribution.