next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Where does next.js go in the stack? Middle-end?

Open FrancosLab opened this issue 9 years ago • 2 comments

Although I feel confident that Next is more-or so the middle-end of an application. Sometimes I find myself hypothetically questioning if Next is right for the job for hypothetical projects.

Let's say for whatever reason platform like facebook was to be rewritten, would Next be suited for handling that and where would it go in the stack?

FrancosLab avatar Jan 21 '17 02:01 FrancosLab

It's definitely for the front end with BYOB(Bring Your Own Backend)

Although it's possible to do some backend work in Next.js, you should only do it to support the UI. Not to serve data.

arunoda avatar Jan 21 '17 02:01 arunoda

You could definitely attach arbitrary routes to your next server (examples: https://github.com/zeit/next.js#custom-server-and-routing), but we don't recommend it.

It's much better suited to plugging into other backends and APIs. For example, you can host your microservices on https://now.sh and query them to get your data (see the examples in the README using fetch).

Thanks for your question!

rauchg avatar Jan 21 '17 03:01 rauchg