di-express VS nestjs-commander

Compare di-express vs nestjs-commander and see what are their differences.

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • talent.io - Download talent.io’s Tech Salary Report
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Scout APM - Truly a developer’s best friend
  • InfluxDB - Build time-series-based applications quickly and at scale.
di-express nestjs-commander
4 10
- 235
- -
- 9.7
- 4 days ago
TypeScript
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

di-express

Posts with mentions or reviews of di-express. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-08-29.
  • Any good tutorial showing you which library to use for dependency injection in a project?
    9 projects | reddit.com/r/node | 29 Aug 2021
    `AccountEventHandlerTag` is a Symbol, acts as an ID reference for the DI Container to provide the correct dependency. AccountEventsController is not really coupled to any dependency (however it does rely on interfaces form another module), you can see here how such controller can be tested, where you manually create the dependency tree with fakes and stubs as you like https://gitlab.com/legited/di-express/-/blob/master/tests/web-server/controllers/accounts.controller.test.ts . This approach removes the need for module mocking from libraries like Jest and Rewire
    9 projects | reddit.com/r/node | 29 Aug 2021
    Express is a router library for a web server, dependency injection is a concept universal for any OOP programs. There are no good tutorials on integrating Express with DI, I had to figure it out myself when I needed to modularize an app. Here's a proof of concept project, you can follow the structure to see how it all comes together - https://gitlab.com/legited/di-express.
    9 projects | reddit.com/r/node | 29 Aug 2021
    Sorry for the naive question, but could you explain what the benefit of this is as compared to just setting the imported dependency directly as a class field, e.g.: how is this:
    9 projects | reddit.com/r/node | 29 Aug 2021
    you can see here how such controller can be tested, where you manually create the dependency tree with fakes and stubs as you like https://gitlab.com/legited/di-express/-/blob/master/tests/web-server/controllers/accounts.controller.test.ts

nestjs-commander

Posts with mentions or reviews of nestjs-commander. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-31.
  • Node.js frameworks
    4 projects | reddit.com/r/node | 31 Mar 2022
    This absolutely isn't true. I'm both on the core team and a maintainer of several open source modules for Nest (nest-commander for CLI creation, ogma my own logger that has a really powerful interceptor, nestjs-spelunker which can print out an object representation of your Nest application and help with module debugging for dependency resolution, and a few more). The command module is even featured in the docs.
  • So far one of the best tools to build CLI interfaces is Oclif by Heroku. What are you all using?
    6 projects | reddit.com/r/node | 3 Nov 2021
    I work with the NestJS framework a lot and ended up writing nest-commander as a commander wrapper for NestJS, so my CLIs and servers can use the same framework. Lately I've been working on adding in plugin support too.
  • Automating your package deployment in an Nx Monorepo with Changeset
    6 projects | dev.to | 5 Oct 2021
    Overall, I'm pretty excited to have this flow automated and working through three of my favorite package management tools. Everything will also work if you're using a yarn workspace instead, just change the sed script to modify the workspace file for yarn instead of the one for pnpm. I'm currently using this for my ogma and nest-commander repositories, feel free to have a look if you need some inspiration and/or real life examples. If you're developing packages and using an Nx workspace and need automated package deployment, give this a shot.
  • Any good tutorial showing you which library to use for dependency injection in a project?
    9 projects | reddit.com/r/node | 29 Aug 2021
    There's also packages like nest-commander (disclaimer: that one is also mine) for making CLI applications instead of HTTP servers.
  • Building RESTful API's with Node. What's your approach?
    2 projects | reddit.com/r/node | 23 Aug 2021
    I've used Express, Fastify, and NestJS for the most part. I almost exclusively work with NestJS now, as you can imagine. The fact that it has an opinionated structure for how to architect your application is something that drew me in to begin with. With almost every Nest application I can pick it up, scan the structure, and have a good idea of what's going to be happening at a very high level. It also has defined classes with specific roles. A guard will always be used for authentication, a pipe will always be for transformation and validation of request information, a filter will always be for error handling. The only one that doesn't have a "this is always for that" is an interceptor, which is pretty much your middleware of the Nest world. Logging, caching, response mapping, it can do it all. There's also using Nest for more than just web servers, as there's nest-commander (one of my packages) for CLI applications, and there's discord bot packages for Nest as well.
  • I built a console command package for NestJS
    2 projects | reddit.com/r/Nestjs_framework | 26 Jun 2021
    Overall it looks pretty good. I prefer having each class as it's own command line how nest-commander does it, but this seems to be a pretty good alternative
  • Creating a web server with typescript, should I go for express or fastify? Which one has better packages for typescript integration? Any recommendations for packages for each?
    2 projects | reddit.com/r/node | 20 Jun 2021
    There's two underlying packages, one for either HTTP adapter, @nestjs/platform-express and @nestjs/platfoorm-fastify. Both of these have HttpAdapter classes that implement the abstract HttpAdapter that Nest uses as a main interface. Nest doesn't actually need the adapters to run either, you can make a microservice application that doesn't have any HTTP components, or even CLI applications with community packages (disclaimer: that one is mine). Nest is really there to help provide the modular system and help with architecture (in my opinion).
  • I took a look at Nest.JS on the recommendation of a friend and honestly, it just looks like people are re-inventing the wheel (Spring Boot) on top of the Node.js runtime.
    2 projects | reddit.com/r/node | 14 Mar 2021
    The entire idea Kamil had behind Nest was to create a framework that encouraged clean architectural design and a common format for Node projects. I've gone so far as to develop packages on top of it that aren't HTTP related at all, like command line applications and an abstraction to help create them.

What are some alternatives?

When comparing di-express and nestjs-commander you can also consider the following projects:

nest-console - Create beautiful CLI commands in your NestJS Applications

routing-controllers - Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.

InversifyJS - A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

Ink - 🌈 React for interactive command-line apps

opentelemetry-js - OpenTelemetry JavaScript Client

nx - Smart, Fast and Extensible Build System

gluegun - A delightful toolkit for building TypeScript-powered command-line apps.

testing-nestjs - A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!

controller - A simple controller design pattern for curveballjs

Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀

ogma - A monorepo for the ogma logger and related packages