Alterrae-backend
A RESTful API for Sistearth v4 implemented in Java
Project maintained by mbarberot
Hosted on GitHub Pages — Theme by mattgraham
Alterrae Backend
A RESTful API for Alterrae game, implemented in Java
How to use
What you need
- Java 8
- Maven
- Docker & docker-compose
- Source code
Build
mvn clean install
This will build, test, package code and build docker image.
Run
docker-compose up
or docker-compose start
This will run both server and databse container + adminer to manage db
Useful tools
Sonar
Source code analysis tool.
- Run Sonarqube server with docker
- The first time :
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube:5.1
- Nex time :
docker start sonarqube
- Launch analysis with maven
Adminer
PHPMyAdmin-like, but lighter
- Run with docker :
docker run -d -p 8888:80 --link alterraebackend_database_1:database clue/adminer
- Go to http://localhost:8888
- Login using db credential and host will be 'database'.
Keytool (provided by java jdk)
Creating keystore (example for the test keystore) :
- run
keytool -keystore keystore -alias alterrae -genkey -keyalg RSA
- use password :
alterrae
- At question "What is your first and last name?" put your url (ie: api.alterrae.com)
Tools
Dev
- Java
- Spark framework (light, easy and simple)
- Guava
- Sql2o
- Jackson
- Lombok
- JUnit
Deployment
- Docker
- docker-compose
- MariaDB (+ official docker image)
Reason (vs PHP / Symfony backend)
- KISS
- No more "magic" framework (thinking to you JEE and Symfony)
- Dev comfort : explicit types, easier to monitor/debug, maven