Nestyjs Template is a boilerplate project for Nest framework. It will have some common features required in most server applications and will follows best coding practices.
- Docker environment (dev and prod)
- Logger
- Logger endpoint for client applications usage
- Configuration
- TypeORM integration
- Users CRUD
- Swagger Documentation
- Add oauth2, local, jwt passport strategy
- Add Client and User Authorization for endpoints
- Get current user endpoint
- Add role based security to endpoints
- Security
Next features to be added:
- Add unit tests
- Verify user email
- Update password endpoint
- Cache with Redis
Make a copy of the sample.env file, and rename it to .env file, then add your own configuration values.
This repo has a Dockerfile and a docker-compose.yml included that has all the required steps and dependencies to run the project (a node image for the server and a postgreSQL for the database). If you have docker installed you only have to run:
$ docker-compose up
It will install all the required dependencies and run the application in dev mode. (remember to update the configuration in the .env file)
$ npm install
Install PostgreSQL and add the configuration in the .env file
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
(If you are using docker you have to enter to the docker container)
- Website - https://noroofdevelopment.com
- Twitter - @noroofdev