This is the backend for the Questophant app.
To build the backend components you need the following software:
- Java 10+
- Maven 3.6+
$ git clone https://github.com/Questophant/backend.git
Open a command shell aka terminal and run:
$ cd backend
$ mvn clean install
To start the server run in directory `backend:
$ mvn spring-boot:run
Then open the browser for URL [http://localhost:8080].
To run the local development server you need a MySQL database installed. Either you install MySQL on your machine or you can use local build infrastructure with docker/docker-compose using the official MySQL docker image. Install Docker for your operating system and then run:
$ docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_USER=test -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=questophant -p 3306:3306 -d mysql
This command will start a MySQL server with a default database named questophant
and a user test
(password: password
). The user root
has the password secret
.
Optional: Download the Google Doc file to an Excel (.xlsx) file and replace the file in the documents
folder.
To import the challenges from the file run the backend with:
$ mvn spring-boot:run "-Dspring-boot.run.arguments=import='documents/Challenges - Zusammenfassung gemeinsames Projekt.xlsx'"
The backend is built to be used with MySQL. If you want to use MariaDB, run the script /scripts/mariadb.sql after you changed to your database "USE questophant;".
For further reference, please consider the following sections: