Copy environment variables file and fill it with API keys and secrets.
cp .env.dist .env.dev
cp .env.test.dist .env.testStart the project (add a -d flag to run it in background)
docker compose -f docker-compose.yml -f docker-compose.dev.yml upEverytime that you up the project, it will do the following things for you in the background :
- Check and install dependencies (Useful when installing the project for the first time or when switching branches).
- Apply last changes on the
schema.prismato the database and update the prisma client. - Start Prisma Studio on port 5555.
- Start the NestJS API in dev mode.
Push database changes
npx prisma db pushYou can now go to http://localhost:3000 to see the app !
| Service name | URL | Description |
|---|---|---|
| API | http://localhost:3000 | The API home page. You can address all requests to that endpoint. |
| API | http://localhost:3000/docs | The API Swagger documentation. You can read the functional documentation and try all endpoints. |
To open a terminal inside the container.
docker exec -it etu-utt-api shInside that terminal, you can run any command you want, like this one to acces NestJS CLI.
npx nestTo run lint.
npm run lintTo run end to end tests (e2e) in watch mode.
npm run test:e2eSetup environment variables
cp .env.example .envInstall dependencies
yarnSetup the database
yarn prisma generate
yarn prisma db pushStart the project
# In developping mode
yarn start:dev
# In debug mode
yarn start:debug
# In production
yarn build
yarn start:prodTo commit
git cz