From this folder you can run a mocked backend server to provide a API to change JSON-files for the project.
To run the server
python3 server.py
Or if you are planning on developing more on the server, this command is handy
nodemon --exec python3 server.py
The following entries are available in the API
Methods: GET, POST
Send and receive the answers made by a user at ID
Methods: GET
Receive a question by ID
Methods: GET
Receive configuration for user at ID
Methods: GET
Receive if the user exists
Returns: {"status": Boolean}
Methods: POST
Registers a new user
If you want to test the API, run the server and open a GET-path in your browser. To send a POST, use a tool like Postman og curl.
curl http://localhost:8080/<entry>
curl --header "Content-Type: application/json" \
--request POST \
--data '{<data>}' \
http://localhost:8080/<entry>