This API allows managing consultants, grouped by client, within a mapping application. It provides functionalities to create, read, update and delete consultants and/or clients, accessible to authenticated users (with roles: regular user or administrator).
- Clone this repository.
- Configure your
.env
file by filling in the details from.env.example
(including the credentials for the first default "admin" user). - Run
npm install
to install dependencies. - Run
npm run start:dev
to start the server.
Run npm test
to execute unit tests.
After creating an empty database in PostgreSQL, run:
npm run migration:create-dev
npm run migration:generate-dev
npm run migration:run-dev
Run npm run start:dev
to start the server.
=> API documentation link: http://localhost:5000/api-docs/
To test the API after logging in (via Postman, Insomnia, ThunderClient, or other tools), retrieve the token and include it in the Header:
The frontend repository is available at: esn-map-client