App running with Nest framework TypeScript starter repository.
$ yarn
This project use private package with verdaccio (.npmrc_config and .yarnrc_config). If you want to install this project, please let me know at [email protected].
Start container :
docker-compose up -d
then :
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
Mamimomo database is create on the first docker-compose execution. You do not need to create db.
To start with a good database you can run this :
yarn typeorm migration:run
If you need to generate a new migration after entity change you can run :
yarn typeorm migration:generate -n <migration-name>
If you need to revert the last migration :
yarn typeorm migration:revert
You can check what does this command in your package.json.
You can discover more command with yarn typeorm
yarn build
️
then you can run yarn migration:run
After migration you can create some fake data to start developing :
yarn seed:run
The idea was that the seeds should be isolated and run one use case like createAdminUserWithPets.seed.ts. With that we do not need any ordering.
Authentication system works with JWT. We using passport.js to handle authentication.
- Request control is handle by passport jwt strategy.
- Simple connection is handle by passport localstrategy. (provide jwt with email and password)
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Find swagger-ui on http://localhost:8080/api/
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.