A minimal proxy API built with TypeScript and Express.
Fetches weather data from WeatherAPI.com and returns a simplified JSON response for frontend use.
- Get current weather by city name
- Clean, developer-friendly JSON format
- Supports Turkish language descriptions
- Simple setup with
.envconfiguration - Ready for frontend integration
- Backend: TypeScript, Node.js, Express
- HTTP Client: Axios
- Environment Config: dotenv
- Weather Provider: WeatherAPI.com
- Node.js (v18+ recommended)
- npm or yarn
- WeatherAPI API key (free tier available)
- Clone the repository:
git clone https://github.com/firatmio/weather-proxy-api
cd weather-proxy-api- Install dependencies:
npm install- Create a
.envfile in the project root:
PORT=3000
WEATHER_API_KEY=your_api_key_here
WEATHER_API_URL=http://api.weatherapi.com/v1/current.json- Run in development mode:
npm run dev- Build & run in production:
npm run build
npm startRequest:
GET http://localhost:3000/api/weather?city=Istanbul
Response:
{
"city": "Istanbul",
"country": "Turkey",
"localtime": "2025-08-30 02:40",
"temperature": 23,
"feels_like": 24,
"condition": "ParΓ§alΔ± bulutlu",
"icon": "//cdn.weatherapi.com/weather/64x64/day/116.png",
"wind_kph": 12,
"humidity": 65
}weather-proxy-api/
βββ src/
β βββ index.ts # Entry point
β βββ routes.ts # Routes
β βββ weatherService.ts # Weather fetching logic
βββ .env # Environment variables
βββ package.json # Project metadata
βββ tsconfig.json # TypeScript config
βββ LICENSE # MIT License
βββ README.md # Project documentation
This project is licensed under the MIT License. See the LICENSE file for details.