- Maven 3 (v3.3.9)
- Java 8 (v1.8.0_152)
- Google Chrome ES6 (v75.0.3770.100)
mvn clean package exec:java
This will run the backend on http://localhost:8080/
You can call the API directly at http://localhost:8080/weather?location=LOCATION and replace LOCATION with a sample string such as "Hong Kong, HK"
- Setup of Jersey API
- Enable CORS on backend API
- Create index page with form to submit to the backend API
- Install Guice dependency for dependency injection
- Install marshaller dependency to/from JSON
- Retrieve weather data from OpenWeatherMap.org
- Get City ID from OpenWeatherMap.org
- Get City Weather using City ID from OpenWeatherMap.org
- Parse weather data from OpenWeatherMap.org to extract overall weather description
- Parse weather data from OpenWeatherMap.org to extract temperature in Celsius
- Parse weather data from OpenWeatherMap.org to extract sunrise times
- Parse weather data from OpenWeatherMap.org to extract sunset times
- Convert times to 12 hour format
- Convert temperature to Fahrenheit
- Return all data via API endpoint /weather
- Extract server port and app variables into environment vars or configuration files
- Unit tests
- Environment Maven profiles