Full-featured starter for Typescript Node & Mongo Rest API server featuring NestJS!
- dotenv environment variables
- MongoDB/mongoose configuration
- Passport authentication
- Validation with class-validator
- Mailer
- Serve-static middleware
- Compression
- Security with helmet
- Logging middleware (Bunyan)
- Swagger documentation
- Access logs with Morgan interceptor
- user signup
- user activation
- user login
- user relogin
- password reset
- forgotten password
This project uses modular swagger configuration. Each feature has it's own swagger document. Follow these steps to add new feature:
- In feature folder create
feature.swagger.ts
file. - Call
setupSwaggerDocument
and export the returned function. - Register feature module in
feature.module.ts
by calling the exported function from step 2. - Access your document at
/docs/:featurePath
.
For a concrete example see the auth
feature.
This backend will play nicely with awesome react-starter create-react-app project written in Typescript!
MIT