This service provides an API for retrieving weather data, logging requests in Redis, and exposing Swagger documentation for API interaction.
- Docker and Docker Compose installed
- Node.js (v18 or higher) and npm installed
git clone https://github.com/EugeneSafonov/ITSoft-TestTask
cd ITSoft-TestTaskcp service-a/env.example service-a/.env
cp service-b/env.example service-b/.env
cp env.example .envYOU NEED TO GET PUBLIC API FROM https://www.visualcrossing.com/ USING FREE PLAN OR YOU CAN USE TEST API KEY JHR47AVF7FR3MCJAAH9AD3FS9
Insert this API key to a variable of ./service-a/.env called API_KEY
Modify other variables if needed.
To run the project in production mode, use Docker Compose:
docker compose up -d --buildVerify that containers are running:
docker ps- Swagger UI (Service A): http://localhost:4000/doc
- Swagger UI (Service B): http://localhost:3000/doc
To stop and remove all containers:
docker compose downcp service-a/env.example.dev service-a/.env
cp service-b/env.example.dev service-b/.env
cp env.example .envYOU NEED TO GET PUBLIC API FROM https://www.visualcrossing.com/ USING FREE PLAN OR YOU CAN USE TEST API KEY JHR47AVF7FR3MCJAAH9AD3FS9
Insert this API key to a variable of ./service-a/.env called API_KEY
Modify other variables if needed.
For development, it's recommended to run databases and message brokers in Docker, while running services locally.
docker compose up -d database database_logs redis rabbitmqcd service-a
npm install
cd ../service-b
npm installcd service-a
npm run start:devcd ../service-b
npm run start:dev