The consumption counter is used by T.F.V. 'Professor Francken' to keep track of food & drink purchases of its members.
The application has been boostrapped using Create React App and uses an external API for retrieving its data.
To setup the application first install its dependencies using npm,
npm installNext check if all the test pass,
npm run testAnd if successful run the app,
npm run startThis will open the application in a new browser window located at https://localhost:3000.
We use cypress for our end-to-end tests. These tests will be run using Github actions, but can also be run locally by calling,
npm run cypressNote: before running this command make sure that you've started the
application by running npm run start.
This will open a user interface listing all of our integration tests, which you can run by clicking "Run all specs".
By default we use miragejs to develop and test the application. This means that each time you start the application a new in-memory database is initialized.
The Consumtion Counter requires the following endpoints
If you don't want to install npm locally you can use docker instead to install and run the application,
# First install dependencies
docker-compose run --rm node npm install
# Check if all unit tests pass
docker-compose run --rm node npm test
# Start the node server at port 30000
docker-compose up