Backend service to collect and manage msadoc metadata of microservices.
At this point, we expect that you have already performed the steps described in the Main README.
There are multiple ways to run the backend, depending on your concrete use-case:
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod- The server application is available on
localhost:3000. - Swagger UI serves the API documentation on route
/api. Password for API sign-in is in your.envfile.
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covThere are the following authentication mechanisms, each represented by an AuthGuard class:
JwtAccessAuthGuard- the classic API endpoint protectionUserPasswordAuthGuard- only used to get JWT tokensJwtRefreshAuthGuard- only used to refresh a JWT access tokenApiKeyAuthGuard- only used for endpoints used by CI
Usage: Annotate method in controller with e.g. @UseGuards(JwtAccessAuthGuard)
- Change the
ormclasses you want to change. - Make sure your
.envfile points to the right database. - Run
npm run typeorm:generate-migration --name=<MigrationName>to create a new migration file in/src/database/migrations. - The next
npm run startwill automatically execute all required db migrations.
You can access PGAdmin on localhost:5433
Login credentials:
- Email:
example@example.com - Password:
example
Database password: password