This application consists of a Go backend API and a React frontend, containerized using Docker for easy deployment.
- Located in the
server
directory - Provides a RESTful API endpoint for weather forecasts
- Uses Redis for caching to improve performance
- Located in the
client
directory - Built with React and TypeScript
- Communicates with the backend API to fetch and display weather data
- Docker
- Docker Compose
- Clone the project to a directory of your choice.
cd C:/your/directory
git clone https://github.com/Tgenz1213/weather
- Open a terminal or command prompt and navigate to the extracted directory.
cd C:/your/directory/weather
- Rename or duplicate .env.example to ".env.development" in both project folders
cp server/.env.example server/.env.development
cp client/.env.example client/.env.development
-
Ensure the mode in ./.env matches the .env.[MODE] files that you wish you use.
-
Ensure Docker and Docker Compose are installed on your system.
-
Run the following command to start the application:
docker compose up
This command will build and start both the frontend and backend services.
- Once the containers are running, open a web browser and navigate to:
- You should now see the Weather Forecast application. Enter a street address (including the building number) and zip code to get the weather forecast.
This project includes shared VS Code workspace settings and recommended extensions to help standardize and speed up environment setup.
- Open the project folder in VS Code to automatically use these settings.
- You will be prompted to install recommended extensions for the root, client, and server workspaces.
- To get started, simply open the
.vscode/weather.code-workspace
file in VS Code. - Install react dependencies with Yarn and install pre-commit hooks
- If you encounter any issues, ensure that ports 3000 and 8080 are not in use by other applications.
- Check the Docker logs for any error messages:
docker compose logs
For further assistance, please open an issue on the GitHub repository or contact Timothy Genz at [email protected].