This is the main NestJS application for yyenza.
- Node 20
- NestJS
- Postgres
This app can be either run on a docker compose environment or local environment for convenience. Postgres DB will be run on a docker environment. Before you get started, you'll need to install a few tools:
- Run NestJS app Locally:
- To run locally, install the dependencies
// install dependencies
npm install
// generate types using prisma cli and initialise database
npx prisma generate && npx prisma migrate dev
// seed data to db
npx prisma db seed
// start the app
npm run start:dev
- App should be running at
http://localhost:3000/
- If you send a GET request to
http://localhost:3000/
you should get "Hello World!"
- Docker Compose: This tool is used for defining and running multi-container Docker applications.
- Install Docker Compose Desktop and cli
- Run the following command to start the app (http://localhost:3000) and Postgres in docker
- Note that in
docker-compose.yml
file,DB_HOST
must be equal to the database service name (ie:db
in the docker-compose file)
docker compose up -d
- To view the API endpoints in Swagger, once you start the NestJS app (see instructions above), you can go to
http://localhost:3000/api
Project is deployed on AWS......