-
Couldn't load subscription status.
- Fork 91
Description
From #92:
@kyle-mccarthy
Part of me wonders if setting up nest as a standalone application and exposing a router from nest-next to handle all the api routes would be best.
@yakovlev-alexey
Setting up Nest as a standalone application seems like a cool idea. Though I think it offers an entirely different approach to Nest and Next integration. Want to play around with this idea a bit and see how it could work.In this particular case perfomance could also be important. From my experience debugging Next it strongly leans toward serverless. Even when running as a server (detached or not) it will dynamically require built pages (Next emits both server and client bundles for each page with server being the larger one with SSR methods and their deps). Running standalone could end up creating a new Nest standalone app for each request.
That might have changed since my testing but I believe Next maintainers are very opinionated on Next usage and as a commercial company try to sell Vercel deployment by not introducing features that would help using Next effectively outside Vercel.
Monkey-patching Next detached server could work...