SLM Assignment

How to run

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.

Testing

Preview

Preview

Choose driver

You can choose which driver packages you want to see by choosing the drivers name from the list as shown below. Choose driver

Moe packages

Scan package

If you want to scan a package you enter its voucher on the input field as shown below. Enter voucher

State changed

If you enter a non valid voucher, an alert message will be displayed.

Non valid voucher

Reset states

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.

Notes

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.