back

by mmarian·2y ago·view on hn ↗
I don't think anything involving Next.js is the future. The framework is overly complicated and very hard to self host.
1 comments
Hey there, what issue are you having self-hosting Next.js?

https://nextjs.org/docs/app/building-your-application/deploy...

Hey Lee - I tried setting up a self hosted POC today and it looks pretty tricky:

  * The shared cache loader is left to the user to implement (instead of say, just pass a Redis URL)
  * The revalidate XYZ doesn't seem to work with Cloudfront etc
  * The image lambda is left to the user
  * The Cache-Control header isn't correct
Middleware can only use a subset of NodeJS APIs https://github.com/vercel/next.js/discussions/46722
Middleware is still fully supported when self-hosting. I agree that it would be helpful to have a Node.js route level middleware primitive. This primitive, for "global" middleware, intentionally has a limited runtime.

https://nextjs.org/docs/app/building-your-application/deploy...