This repository contains two projects:
- quarkus-weather: A REST API built with Quarkus that provides weather information for a given location.
- weather-client: A web client built with Spring Boot that consumes the Quarkus Weather API.
These projects are an evolution of the original console application weatherylocation, updated with knowledge gained from the DIO.me course on containers.
- Quarkus, RESTEasy, Jackson and Java
- Spring Boot, Thymeleaf, htmx, Tailwind CSS and Java
/
├── quarkus-weather/
│ └── [Quarkus project files]
├── weather-client/
│ └── [Spring Boot project files]
└── README.md
To use this application, you will need to include the API key generated on the weatherstack
website here in the config.properties file.
You will also need to include the API key generated on the mapbox
website here in the config.properties file.
Then add your keys to application.properties
file on quarkus-weather
project:
weather.api.key=YOUR_WEATHERSTACK_API_KEY geolocation.api.key=YOUR_MAPBOX_API_KEY
- Navigate to the
quarkus-weather
directory. - Build the project:
./mvnw clean package
- Run the application:
The API will be available at
java -jar target/quarkus-app/quarkus-run.jar
http://localhost:8080
.
- Navigate to the
weather-client
directory. - Build the project:
./mvnw clean package
- Run the application:
The client will be available at
java -jar target/weather-client-0.0.1-SNAPSHOT.jar
http://localhost:8081
.
- Start both the Quarkus Weather API and the Spring Boot Weather Client.
- Open a web browser and navigate to
http://localhost:8081
. - Enter a location in the text field and submit to see the weather information.
GET /weather/{location}
: Get weather information for a specific location.
- Original project: weatherylocation
- Course: DIO.me
Copyright (c) 2012-2024 Scott Chacon and others
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.