Next.js: [Question] Can next.js use faster alternatives to expressjs (like micro/connect/fastify)?

Created on 7 Jan 2018  路  2Comments  路  Source: vercel/next.js

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

When it comes to node servers, expressjs has now got tough competition when it comes to performance.
Here is a benchmark which shows some alternatives like micro, connect and fastify are much faster/efficient than expressjs.

Are there any plans of next.js moving to one of these faster alternatives to expressjs?

Most helpful comment

Hi,

You can use next.js with the server of your choice :
https://github.com/zeit/next.js#custom-server-and-routing

Here is an example of next.js with fastify :
https://github.com/zeit/next.js/tree/canary/examples/custom-server-fastify

Another example with micro :
https://github.com/zeit/next.js/tree/canary/examples/custom-server-micro

The list of all examples (look at the custom-server ones) :
https://github.com/zeit/next.js/tree/canary/examples

All 2 comments

Hi,

You can use next.js with the server of your choice :
https://github.com/zeit/next.js#custom-server-and-routing

Here is an example of next.js with fastify :
https://github.com/zeit/next.js/tree/canary/examples/custom-server-fastify

Another example with micro :
https://github.com/zeit/next.js/tree/canary/examples/custom-server-micro

The list of all examples (look at the custom-server ones) :
https://github.com/zeit/next.js/tree/canary/examples

To be clear, we don't use express in the core. We're just using the http server node provides.
As @lucleray said you can use it with anything 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

jesselee34 picture jesselee34  路  3Comments

sospedra picture sospedra  路  3Comments

wagerfield picture wagerfield  路  3Comments

swrdfish picture swrdfish  路  3Comments