Hacker News new | ask | show | jobs
by gusbremm 1886 days ago
I wish there was a nodejs equivalent to Laravel
7 comments

This is very surprising to me honestly. Yeah, folks have pointed out some of the big players, but none of them have really risen above the competition.

You would think NodeJS would have a clear cut dominant, monolithic web framework by now but there isn’t. Everyone seems to be happy to throw together hodge-podge Express apps.

I'm not sure whether it's due to the language or community, but it's the same with Go: there's a preference for libraries and very light frameworks over full-stack like Django/Rails/Laravel.
That is because everyone is writing SPAs with node and thus only needs an api like express for the backend stuff.
Even for writing APIs a monolithic web framework can be useful.

We're building a Django + React web app, and Django brings many things to the table, for example the admin panel, an opinionated structure, and many other goodies. Much better dev experience than just Express for a small team, IMO.

True but there is alternatives like NestJS for example. So there is some stuff a bit like Django for node as well but I'll admit that they are less common.

I don't know why, maybe it's the culture of node/npm that you just pick stuff from a basket instead of getting handed a big finished thing whatever you like it or not.

Why not Django REST Framework if you're feeding an SPA?
I would say next.js comes closest for a ‘nodejs server framework’ for me. It’s really great to only use one language for frontend, backend and templating.
But to really come close to laravel I would add something like blitzjs.com or redwoodjs.com. Blitz is built on top of next and adds ORM (Prisma), code generators, even authentication out of the box, so it's really close to Laravel. Redwood is its own thing AFAIK, but also aims to be closer to a full stack framework.
Adonis.js is the closest one imo
There are multiple projects like this in beta now. It seems like the javascript community has become open for the idea of monoliths, so it will be interesting to see how it plays out.
Look into Sails.js -- it's not the same but it's something
I'd take a look at Nest.
Nest.js is more like Angular
I think you're thinking of Next/Nuxt. I'm a laravel dev but have tried every framework under the sun cause I get bored.

Next/Nuxt are basically react/vue SSR / Server Side Rendering or SPA frameworks... which seems more like Angular..no?

Nest.js is a fullstack backend framework more like fastify or express and has guides on connecting databases, graphql, etc....

Personally, if I were going to go with node, I'd choose nest.js or feathers or express as they have the best ecosystems ... but none seem as mature as laravel, rails, or django.

The last sentence in their philosophy section reads " The architecture is heavily inspired by Angular." https://docs.nestjs.com/#philosophy
Maybe they were inspired by the way it was built/laid out, but angular is more in the vein of react/vue.

Nest.js is more like feathers, actix for rust, flask, lumen, etc... it's not as opinionated iirc last time I played with it... so there's not a specific way everything is organized like a rails or laravel project... if I were doing node it'd probably be nest, but w/ swoole/octane and knowing laravel inside/out I'm gonna lose time/productivity switching to anything else, so I stick w/ what I know.

Adonis.js is is basically a Laravel clone for Node