nestjs-typegoose
mongoose-tsgen
nestjs-typegoose | mongoose-tsgen | |
---|---|---|
2 | 3 | |
286 | 6 | |
- | - | |
0.0 | 0.0 | |
15 days ago | almost 3 years ago | |
TypeScript | TypeScript | |
MIT License | - |
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.
nestjs-typegoose
- Is it possible to generate Mongoose schemas?
-
On Nestjs
As much as I don't like to use it, there are people who decide that NoSQL and MongoDB are the way to go for their application. Before v7, Nest didn't provide it's own decorators for a mongoose integration, and developers had to use the standard schema approach. While there's nothing wrong with this, it definitely does bring in some pain points when it comes to types and DTOs, so a SchemaFactory was created to allow developers to keep using classes to define their mongoose schemas. This works pretty well, but does admittedly lack some features, like virtuals and static methods. These can be added to the generated schema, but Typescript will not know about them. I usually suggest people use nestjs-typegoose instead of Mongoose/Typegoose integration with NestJS.
mongoose-tsgen
-
Working With Mongoose In Typescript
I've been working on a more lightweight option as well, would love any feedback if you have the chance to check it out! https://github.com/Bounced-Inc/mongoose-tsgen
- I've been working on a Typescript interface generator for Mongoose and would love any feedback! It reads your Mongoose schemas and generates associated Typescript interfaces to be used in your code, removing the need to maintain duplicate interfaces or rewrite your schemas with other libraries. 🚀
What are some alternatives?
MikroORM - TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, MS SQL Server, PostgreSQL and SQLite/libSQL databases.
typegoose - Typegoose - Define Mongoose models using TypeScript classes.
prisma1 - 💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
nodejs-backend-architecture-typescript - Node.js Backend Architecture Typescript - Learn to build a backend server for production ready blogging platform like Medium and FreeCodeCamp. Main Features: Role based, Express.js, Mongoose, Redis, Mongodb, Joi, Docker, JWT, Unit Tests, Integration Tests.
crud - NestJs CRUD for RESTful APIs
mongoose-tsgen - A plug-n-play Typescript generator for Mongoose.
nx-node-apollo-grahql-mongo - Nx Nodejs Apollo - TypegraphQL / GraphQL / Express / MongoDB - Typegoose API Boilerplate
bulletproof-nodejs - Implementation of a bulletproof node.js API 🛡️
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
nestjs-ioredis - IORedis module for Nest
typescript-starter - Nest framework TypeScript starter :coffee: