newtang / expresso

A faster, safer, backwards compatible router alternative for Express.
MIT License
5 stars 0 forks source link

Support basic http server #13

Closed newtang closed 3 years ago

newtang commented 3 years ago

Router tests are tested against a basic node http server.

function createServer(router) {
  return http.createServer(function onRequest(req, res) {
    router(req, res, finalhandler(req, res))
  })
}

It doesn't look like much work to support it. Here's a couple areas we fall short:

newtang commented 3 years ago

I'm calling this done. We handle the buildOptionsHandler in the basic server, and use req.url if req.path isn't present. More url manipulation is necessary to support fqdn. We succeed in a great many router tests now, and have several of our own.