weather-app
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
index.ts
https://stevekrouse--3d25ad56365d11f0baec9e149126039e.web.val.run
A super simple weather application built on Val Town that allows users to search for weather information by city name.
- Search for weather by city name
- Display current weather conditions including:
- Temperature
- "Feels like" temperature
- Humidity
- Precipitation
- Wind speed
- Visual weather indicators with emojis
- Responsive design that works on mobile and desktop
- Backend: Hono.js API that fetches data from Open-Meteo
- Frontend: Simple HTML/CSS/JS with Twind for styling
- APIs Used:
- Open-Meteo Weather API (free, no API key required)
- Open-Meteo Geocoding API (for converting city names to coordinates)
/backend/index.ts
- API endpoint for weather data/frontend/index.html
- Main UI with embedded JavaScript
- Enter a city name in the search box
- Click "Get Weather" or press Enter
- View the current weather conditions for that location
GET /api/weather?city={cityName}
- Returns weather data for the specified city
- Weather data provided by Open-Meteo
- Built on Val Town