Creating a User Model with Auto-Incremented Code in TypeScript and MongoDB
Creating a User Model with Auto-Incremented Code in TypeScript and MongoDB
Before you begin, ensure you have the following installed:
- Node.js
- MongoDB
- Getting Started Clone the repository:
git clone https://github.com/arivuselvanchinnasamy/node-mongoose-usercode.git
cd node-mongoose-usercode
- Install dependencies:
npm install
-
Update MongoDB_URI with your database URI in the dbConfig.ts file.
-
Run the Test Script
npx ts-node test.ts