git clone https://github.com/SerhiiNikif/todo-list-nest.git
cd todo-list-nest
Create an .development.env
file in the root of the project and fill it with the values from the .development.env.example
file.
PORT=7000
POSTGRES_HOST=postgres
POSTGRES_USER=db_user
POSTGRES_PASSWORD=db_password
POSTGRES_DB=db_name
POSTGRES_PORT=5432
PRIVATE_KEY=secret_key
Depending on how you run the project, the value of the POSTGRES_HOST variable will change:
docker: POSTGRES_HOST=postgres
locally: POSTGRES_HOST=localhost
Docker need to be installed in your OS. To install Docker, please click here.
Enter this command so that the dist folder appears (it is needed in the Dockerfile)
npm run build
docker-compose up
Or run the project locally
npm install
npm run start:dev
Now, you are ready to test all APIs. Just simply open your browser http://localhost:5000/api/docs.
All APIs are protected by accessToken (JWT).
Authorization: Bearer <accessToken>
When user login sucessfully, an unique accessToken will be returned.