News for hackers. Stuff that matters.
Re:Next, Nest, Nuxt Nust? by nsonha on Sunday December 18, 2022 @07:58AM (#34037278)
Next is far from battery included, right now I'm trying it (not the first time, I used it to make static sites before) to make a back end and and have been bitten multiple times by the fact that the same files can be bundled differently on back-end and front-end. For example `next-auth` generates the page `/api/auth/signin` (yes a page behind `/api`) and when I tried to hit it. I got a complain about a knex dependency. Obviously they never expected anything behind `/api` to appear on a front-end bundle, but here it is, they default to such a page.

How about the fact that no one ever has a clear answer on where to put your global server objects, like singletons? connection pool or socket.io server?

In all my search I only ever came to some example where they put the prisma object on `global`. Why do they have to do so instead of just have it the export of some module? If it's because the handler is "serverless" wouldn't that make it a different `global` every time? There is absolutely no explanation on their website on why such trick has to be done for such basic need.

Re:Next, Nest, Nuxt Nust? by 0xblinq on Sunday December 18, 2022 @08:38AM (#34037511)
Wait until in addition to authentication, you have to also add translations and validation messages and make all of this work together nicely, with ssr too.

It’s a total nightmare. The only ones that would deny this is madness are those that have never used a real full stack framework and don’t know what they’re missing.