-
In root of project run: "docker-compose up --build -d"
-
To enter into server bash: "docker exec -it book-management-q-software-app-1 sh"
(check container name with: docker ps -a)
- Change directory: "cd src/database"
Database tables will be created programmatically (in step 1) it is not necessary to have migrations
- To fill database tables with data, in shell run seeders: "npx sequelize-cli db:seed:all"
Swagger documentation is visible on address http://localhost:3000/api-docs/ I made this documentation to have description of all routs and payloads and it is show case how that is implementing. To go deep in creation of full documentation is time consuming. Some routes requires/are gard with Auth header and require user login to use those routes.
The best way to test solution is to use Postman collection and environment from src/utils/postman folder. In those routes is included Auth header and this tool is out of the books for testing.
note: For Jest tests docker-compose will create separate database
-
Project should be in running state: "docker-compose up -d --build"
-
Install jest in root of project with command: "yarn add jest"
-
To run tests, in root of project run: "yarn run test"