There is 2 distinct way to build the application.
A Java runtime environment is needed for the program to run succesfully. Please use your package manager to install one.
./mvnw install
chmod +x ./target/*.jar
./target/*.jar
Safetynet will start in the terminal session, and listen on the default port 8080
for any REST request.
This application was built and tested succesfully on Ubuntu 24.04 with OpenJDK-21.
A container can be spun up that will build and launch Safetynet.
The application will run on port 443
, but can be configured in the docker/docker-compose.yml
file.
docker-compose up -d
The contaienr was tested on CI and with Podman.
curl 'localhost:PORT/childAlert?address=1509%20Culver%20St' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/communityEmail?city=Culver' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/fire?address=1509%20Culver%20St' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/flood?stations=1%2C%202' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/personInfo' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/phoneAlert?firestation=1' \
-H 'Content-Type: application/json'
curl 'localhost:PORT/fireStation?station=1' \
-H 'Content-Type: application/json'
To launch mutation test :
./mvnw test-compile org.pitest:pitest-maven:mutationCoverage