Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
/ open-tides Public archive

A simple rest server written in Java 11, Spring and Docker. Lists tide stations, and tides for a station on a given date.

License

Notifications You must be signed in to change notification settings

guy-keller/open-tides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

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.

Pre-requisites

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

Build

Follow the steps below:

mvn clean package -DskipTests
docker build -t open-tides/open-tides:latest .

Run

To run the server do the following

docker run --name open-tides -p 8080:8080 open-tides/open-tides:latest

Docker Compose

To run it using docker-compose

cd docker-compose
docker-compose up -d

Endpoints

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

License

MIT - Enjoy!

Project supported by JetBrains

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
Jetbrains
https://www.jetbrains.com

About

A simple rest server written in Java 11, Spring and Docker. Lists tide stations, and tides for a station on a given date.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published