Here are the steps to reproduce this on your local machine.
Required tools
- npm or yarn
npm install npm@latest -g
npm install yarn@latest -g
- Docker https://www.docker.com/
Install and run
- Clone the repo
git clone https://github.com/LucianoPierdona/tasks.git
- Install NPM packages
yarn
- run docker compose (the process to compile Nest.js might take longer on Windows OS)
docker-compose build && docker-compose up
- run migrations (in case you don't see it in the logs)
yarn migrate:dev
- server url
http://localhost:3001/
- Register at POST /auth/register with the properties:
{
"email": "email",
"username": "username",
"password": "password",
"role": "admin"
}
1.5. You can also login at POST /auth/login with the properties:
{
"email": "email",
"password": "password",
}
-
Use the returned bearer token on the other requests
-
Endpoints available for tasks
POST /tasks
{
"title": "title",
"description": "description",
"status": "In Progress"
}
PUT /tasks/:id
{
"title": "title",
"description": "description",
"status": "Archived"
}
GET /tasks/:id
GET /tasks/