How giandomanc/weather-platform-backend works
This is a small Express weather-and-business lookup API. A client requests /weather/; the route delegates to a component that chooses query cities or configured defaults, then retrieves weather and Yelp business data for each city and returns the combined JSON. The source shows the route wiring and both external API calls. The README documents .env defaults; the excerpts do not show the exact dotenv-to-file behavior, so that relationship is documented rather than inferred from implementation.
Main entry points: Weather.ts Lookup Handler · index.ts Express Server · weather.ts Weather Route · .env Environment Defaults
Components 9
HTTP API
- Express Server
src/index.ts - Weather Route
src/routes/weather.ts
City Lookups
- Lookup Handler
src/component/Weather.ts - Weather Search
src/component/Weather.ts - Business Search
src/component/Weather.ts - Environment Defaults
.env
External Services
- OpenWeather API
- Yelp API
Other components
- API Client
Connections 8
- API Client → Express Server: HTTP request
README.md - Express Server → Weather Route: mounts at /weather
src/index.ts - Weather Route → Lookup Handler: dispatches GET
src/routes/weather.ts - Lookup Handler → Environment Defaults: uses default cities
README.md - Lookup Handler → Weather Search: calls per city
src/component/Weather.ts - Lookup Handler → Business Search: calls per city
src/component/Weather.ts - Weather Search → OpenWeather API: requests weather
src/component/Weather.ts - Business Search → Yelp API: requests businesses
src/component/Weather.ts