Application developed with Spring Boot 3.3.2 that serves forecast information through a REST API.
This project uses DevContainers to build all the dependencies and programs needed to run it. If you've never heard of them, here's some more information.
Before you can open and run the DevContainer, you need to have cloned the repository into a Linux environment, such as Ubuntu. If you are not in Linux, follow the Windows steps.
You will need to install WSL2 (with Ubuntu) and Docker Desktop and then link Ubuntu with Docker Desktop.
- WSL installation: click here.
- Ubuntu distro installation: click here.
Once you have the above set up, you have to link Docker Desktop with your downloaded Ubuntu distro running in WSL:
- Open Docker Desktop --> Settings --> Resources --> WSL Integration.
- Select your Ubuntu distro.
For everything to start properly, we have to open Visual Studio Code and download the VSCode Remote Development to be able to connect to our distro in WSL. To connect:
- Open the command palette and type 'Connect to WSL distro...'
- Select our Ubuntu distro.
If you are on Linux (Ubuntu), the only thing you need to have installed is Docker.
It is important to note that the repository clone has to be done once we have connected to the WSL (if you are on Windows) from our VSCode.
Once we have done so, we can run the command in a new terminal INSIDE VSCode:
git clone https://github.com/marcguillemdev/aemet-marc-backend
The project uses environment variables to manage the most sensitive properties. The .env file must be located in .devcontainer.
The following properties has to be present:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
- AEMET_API_KEY=your_aemet_api_key
Once we have the .env file created, we can run the DevContainer:
- Open the command palette and type 'Reopen in container...' or 'Open folder in container...'
- Wait for the container to load
- Find the Spring Boot icon in the left sidebar and execute your project
The package is available through DockerHub.