- Clone repository:
git clone git@github.com:perfringis/dev-and-deliver-recruitment-task.git
- Go to a project and install packages.
pnpm install
- Configure .env file based on .env.dev template.
DATABASE_NAME=<YOUR_DB_NAME>
DATABASE_PORT=<YOUR_PORT>
DATABASE_USERNAME=<YOUR_DB_USER>
DATABASE_PASSWORD=<YOUR_DB_PASS>
DATABASE_HOST=<YOUR_DB_HOST>
NOTE! You can omit
DATABASE_HOST
or setup as127.0.0.1
.
- Run project in
dev
mode. List of all commands you will find in thepackage.json
file.
pnpm run start:dev
- Clone repository:
git clone git@github.com:perfringis/dev-and-deliver-recruitment-task.git
- Run docker configuration:
docker compose -f docker-compose.yml up
Documentation is available under localhost:300/api
.
Run tests by:
pnpm test
In docker-compose.yml, you can use environment variables, including those from a dotenv file. This allows you to avoid storing, for example, database credentials in two places (separately in docker-compose.yml and .env) by using environment variables directly in docker-compose.yml. https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/
Done
Integration tests fine.
Add my insights later.
Swagger is fine.
Add my insights later.
The application lacks security measures, such as CORS. It's worth considering these aspects when developing both web applications and APIs. https://docs.nestjs.com/security/cors https://docs.nestjs.com/security/helmet
Added CORS config and HELMET lib.
"Lack of division of the application into modules. All dependencies are placed directly into the main module." https://docs.nestjs.com/modules