To initialize the database, you must start a docker container with the command below.
docker-compose up
After you have initialized the database, you can start the server with the commands below.
npm install
npm run build
npm run start
You can open the front/index.html
with a browser to test the API.
You can choose which driver packages you want to see by choosing the drivers name from the list as shown below.
If you want to scan a package you enter its voucher on the input field as shown below.
If you enter a non valid voucher, an alert message will be displayed.
If you want to reset the status of all the packages to Not scanned
, you can press the Reset button on the bottom right of the screen.
Normally the .env
wouldn't be included in the git repository since it has the database credentials, but for the purpose of the assignment it was included in order to run the database.