Closed timneutkens closed 5 years ago
Sounds great to me, but out of scope for this PR 👍
Looks like need to update README.md.
https://github.com/zeit/micro#programmatic-use https://github.com/zeit/micro#testing
I had some problems with using http.Server
Actually no, the readme is correct. It's just not released on stable yet. You can check https://npmjs.com/micro for the stable readme.
I understood, thanks!
Related: https://github.com/zeit/next.js/issues/7297
For serverless functions,
@now/node
:Current invoking micro() will return a Node.js http.Server which doesn't work well with just
req, res
as a handler. This also ties into using micro standalone with@now/node
. Doing this will also allow us to deprecatemicro-dev
too in favor of using Next.js /now dev
+@now/node
The new programmatic usage works everywhere and really makes Micro a layer on top of the default Node.js request handling.
This solves: