A simple rest server written in Java 11, Spring and Docker.
It uses the https://github.com/guikeller/tides to do the heavy work.
You will be able to get tide stations and tides for a given station on a given date.
Install the following tools / framework:
- Java 11
- Maven 3
- Docker
Install the https://github.com/guikeller/tides dependency into your maven repo.
Download the jar from: https://github.com/guikeller/tides/releases/tag/0.0.3
mvn install:install-file -Dfile=jtides-0.0.3.jar -DgroupId=com.github -DartifactId=jtides -Dversion=0.0.3 -Dpackaging=jar
Follow the steps below:
mvn clean package -DskipTests
docker build -t open-tides/open-tides:latest .
To run the server do the following
docker run --name open-tides -p 8080:8080 open-tides/open-tides:latest
To run it using docker-compose
cd docker-compose
docker-compose up -d
Date format: YYYY-MM-DD
curl http://localhost:8080/api/open-tides/tideStations
curl http://localhost:8080/api/open-tides/tideStationsTree
curl http://localhost:8080/api/open-tides/highLowTides?tideStation=Bolama,%20Guinea-Bissau&tideDate=2021-06-03
curl http://localhost:8080/api/open-tides/hourlyTides?tideStation=Bolama,%20Guinea-Bissau&tideDate=2021-06-03
MIT - Enjoy!
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
https://www.jetbrains.com