/ilovecoffee

NestJS small REST API app

Primary LanguageTypeScript

Nest Logo

I-Love-Coffee

A project from the NestJS Foundamentals official course.

Requirements

Getting Started

  1. Clone the repo in your machine.
git clone https://github.com/nicolasbracigliano/ilovecoffee.git
  1. Install the dependencies.
$ yarn install
  1. Create a .env file in the root of the project with the following environment variables.
DATABASE_USER=<db_user>
DATABASE_PASSWORD=<db_password>
DATABASE_NAME=<db_name>
DATABASE_PORT=<db_port>
DATABASE_HOST=<db_host>

Running the app

  1. Spin the DB using docker
docker compose up db -d
  1. Start the development server in watch mode.
yarn run start:dev
  1. Visit http://localhost:3000/ to access the running application.

  2. Use the Postman Collection to interact with the API.

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Navigating the code

The project is structured such that each chapter has its own branch. This allows for easy access to the chapter of interest and retrieval of the final chapter code. Moreover, every topic within a chapter is accompanied by a corresponding commit.

Support

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.

Stay in touch

License

Nest is MIT licensed.