https://github.com/olehdevua/weather-aggregator
https://github.com/olehdevua/weather-aggregator
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/olehdevua/weather-aggregator
- Owner: olehdevua
- Created: 2025-07-11T09:06:48.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-11T09:28:33.000Z (12 months ago)
- Last Synced: 2025-07-11T12:38:21.056Z (12 months ago)
- Language: TypeScript
- Size: 254 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Structure of backend app
* `__tests__` - e2e tests
* `core` - core services like auth/logger/db-connector
* `lib` - utils
* `servers` - server specific logic to run it
* `weather` - `weather` service, contains business logic and controllers
* `index.ts` - entry point for app
* `run.ts` - run servers
## Project setup
```bash
docker compose up --build
```
Frontend available on "http://localhost:3000"
Backend available on "http://localhost:3001"
You can configure ports in `docker-compose.yaml` `portj` parameter
To configure the Backend app settings, use env variables.
You can modify them in `docker-compose.yaml`
`weather-change-aggregator.environment` parameter.
| Env var name | Env var default value |
|:-------------------|:----------------------------------------------|
| `WA_WS_URL` | `"ws://weather-stream-simulator:8765"` |
| `WA_HTTP_PORT` | `3000` |
| `WA_HTTP_HOSTNAME` | `"0.0.0.0"` |
| `WA_MONGODB_URL` | `"mongodb://mongo/weather-change-aggregator"` |
| `WA_LOGGER_LEVEL` | `"info"` |
| `WA_SYNC_MS` | `20000` |
## Run backend tests
```bash
docker compose up -d --build mongo
cd ./weather-change-aggregator
npm run test:e2e
```