Before starting the project, ensure you have the following installed:
- Docker and Docker Compose
- Node.js (Recommended: v18+)
npmoryarn- Sequelize CLI (installed globally if you want to run migration commands manually)
git clone https://github.com/beito/crowded-assessment.git
cd crowded-assessmentnpm installdocker-compose up -dThis will run MySQL inside a container with the configuration defined in docker-compose.yml.
npm run start:devnpx sequelize-cli db:seed:allThis will populate the database with initial data for users and services.
The server will be available at:
To verify that all backend functionalities work correctly, run:
npm run testThis will display code coverage and test results.
To run tests in watch mode:
npm run test:watchYou can test the API endpoints using curl, Postman, or any API client.
** http://localhost:3000/auth/login **
Expected response:
{
"access_token": "eyJhbGciOiJI..."
}** http://localhost:3000/installments **
** http://localhost:3000/payments **
** http://localhost:3000/installments **
Now you can use the API without issues.