Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (30 loc) · 2.02 KB

README.md

File metadata and controls

45 lines (30 loc) · 2.02 KB

api-server

Master-Branch: Build Status Coverage Status
Dev-Branch: Build Status Coverage Status Maintainability

A simple API-Server that provides a RESTful interface for the frontend, a Websocket for the simulated Blockchain and a Database for persisting the aggregated data.

Start the Server

To start the server you have to instantiate a Docker network by executing the script only once:

./initDockerNet.sh

If an error occurs with the message: 'Error response from daemon: network with name backendnet already exists', search for the currently active Docker network with the command:

docker network ls

And delete the corresponding network with the command:

docker network rm networkname

Then try to start the docker network again. As soon as the Docker network is running you can start the MongoDB Docker with the following script. Make sure that you have set up an .env-file in the database directory with the root username and password.

./initDatabase.sh

After that you can create new users with the script './createDbUsers.sh' provided in the database directory if neccessary. Usually you only have to do this once because the database is persistent.

./database/createDbUsers.sh

And finally start the server with the script:

./initServer.sh

After the procedure you can delete the .env-file for security reasons.