News for hackers. Stuff that matters.
Re:Easily Self-Host Next.js by jamil7 on Thursday October 17, 2024 @03:42AM (#41867316)
What’s specific about next.js that makes it difficult to host vs a node app?
Re:Easily Self-Host Next.js by biosboiii on Thursday October 17, 2024 @03:48AM (#41867347)
nothing specific about next.js but its widely used and this guy chose to provide a easy hands-free tool for that very popular framework
Re:Easily Self-Host Next.js by presentation on Thursday October 17, 2024 @04:16AM (#41867481)
While it's simple to run NextJS as a simple Node process that server-renders everything it's not trivial to run it in the way the Vercel does, including running middlewares specifically on a different edge runtime (as well as supporting the `export const runtime = "edge"` directives); incremental static regeneration (statically pre-rendering some set of routes at build time and then hosting them as static files from a CDN rather than computing them at request time), and so on.

I'm guessing this solution doesn't really do that stuff, but for many apps it's not a big deal if it doesn't.

Re:Easily Self-Host Next.js by graphememes on Thursday October 17, 2024 @07:06AM (#41868414)
I've noticed a lot of this lately where someone is like this is an alternative to xyz and it does like 2% of what that service or application actually does.
Re:Easily Self-Host Next.js by azangru on Thursday October 17, 2024 @04:15AM (#41867477)
> nothing specific about next.js

But why do people online complain so much that Next is difficult to self-host? Is it just because self-hosting is difficult, or is it something about Next? I suppose the fancy stuff such as "skew protection", which is probably going to be quite important for anyone using server components and server actions, is going to be fiendishly difficult to achieve.

Re:Easily Self-Host Next.js by cryptonym on Thursday October 17, 2024 @08:19AM (#41868952)
Next.js is maintained by a hosting company. While the core framework is open-source, all their solutions to deploy and scale properly are not open-source.
Re:Easily Self-Host Next.js by nsonha on Thursday October 17, 2024 @09:32PM (#41875581)
That puts it at the same level as every other framework, who is not owned by a hosting company and doesn't even have an official solution to scale and deploy "properly"
Re:Easily Self-Host Next.js by iforgotmysocks on Thursday October 17, 2024 @04:21AM (#41867512)
Re:Easily Self-Host Next.js by daniel-ash on Thursday October 17, 2024 @05:20AM (#41867809)
Interview with dax from opennext on the topic from a couple days ago:

https://youtu.be/E-w0R-leDMc?si=uzPEd42V_6wxwV9l

Re:Easily Self-Host Next.js by qntmfred on Thursday October 17, 2024 @08:25AM (#41868997)
and leerob did one a few days before that

https://www.youtube.com/watch?v=sIVL4JMqRfc

Re:Easily Self-Host Next.js by bilekas on Thursday October 17, 2024 @12:35PM (#41871196)
I've had some issues with caching and some load balancing but was only testing it out. What frustrated me most was when you ask anyone for advice they just say "use docker" missing the whole point of self hosting.
Re:Easily Self-Host Next.js by nsonha on Thursday October 17, 2024 @09:36PM (#41875604)
Why does self-hosting mean not using docker. Some people don't like overhead, but that's not the point. The point is to control your own stack and docker can make it more managable.

If you dont like docker I guess just copy the script in the Dockerfile?