3 ms·
I wrote a lot of TypeScript just using Express, and it pretty much always ended up looking kind of like this. Today, though, I think this is reinventing the wh
by eropple 8y ago
I wrote a lot of TypeScript just using Express, and it pretty much always ended up looking kind of like this.
Today, though, I think this is reinventing the wheel for little benefit. I've moved my own projects to NestJS (https://nestjs.com/ https://nestjs.com/) and have found myself paying a lot more attention to logic and application behavior rather than structuring code around a too-thin web server.
NestJS uses Express or Fastify under the hood--because both are great web servers!--but serves to make life a lot more pleasant when using them. The way it strongly encourages the decoupling of application logic (services) and the serving of data to clients (controllers) is a good one and, to me, does a much better job of creating an "enterprise NodeJS and TypeScript" environment than rolling one's own.
- stemmlerjs 8y agoI've been hearing a lot about NestJS recently. I've yet to try it out on a Greenfield project. Yeah, I'm totally with you on that. Frameworks have the structure we all need but seem to neglect:) Although there is a lot of merit in learning by doing (hence the purpose of the article and my website overall). Lots of brownfield vanilla Express.js Node APIs can be improved using this pattern.