This is a Boilerplate project for using Express with Typescript using Typegoose for ORM for MongoDB connection
Created By Faizan Zaheer
This Project contains the following: -
- Express Server Setup And Routing with MVC File Folder Structure for Typescript
- Mongoose Models created with heavily typed, Typegoose library
- Repository Pattern with abstract class
- Zod for validations
- Basic Auth Flow , using encrypted JWT and Passport
- Email Sending, SMS Sending
- Event Emitter Publisher and Subscriber Pattern for Optimization
- Bull Queues with Redis for Sending Emails and SMS
- Prettier and ESLint Setup
- Swagger API documentation
- Optimized Docker Build
- Graceful Shutdown
Before running the main project make sure that queue processors are running using :-
- npm run start:email-bullq-worker
- npm start:sms-bullq-worker
For running this example run cmd on cli, npm run start,
For running in development watch mode, run cmd on cli, npm run start:dev