Simple Server-Rendered Weather App

A minimalist, server-rendered weather application built on Val Town. This app requires no client-side JavaScript and works entirely through server-side rendering.

Features

  • Search for weather by location name
  • View current weather conditions including:
    • Temperature
    • "Feels like" temperature
    • Humidity
    • Precipitation
    • Wind speed
    • Weather description with emoji
  • 7-day weather forecast
  • Fully responsive design
  • No client-side JavaScript required

How It Works

  1. The app uses an HTTP val to handle requests
  2. When you search for a location, it:
    • Geocodes the location name to coordinates using Open-Meteo's Geocoding API
    • Fetches weather data from Open-Meteo's Weather API
    • Renders the results as HTML
  3. All processing happens on the server, making this a true server-rendered application

Technologies Used

  • Val Town - Hosting and execution environment
  • Open-Meteo API - Free weather data without API keys
  • Twind - For styling (loaded from CDN)
  • TypeScript - For type safety

Usage

Simply enter a location in the search box and click "Get Weather" to see current conditions and forecast.

Credits