This is a version of the Codédex weather app, modified to run on Vercel with a serverless function.
- Enter a city, get the weather.
- The OpenWeather API key is stored as a Vercel environment variable.
- A serverless function handles API requests, keeping the key secure.
- Serverless function for weather data requests.
- Secure API key storage via Vercel environment variables.
- Deployed to Vercel.
- Add your OpenWeather API key as
WEATHER_API_KEY
in Vercel. - Deploy the project on Vercel.
index.html
: Main web interface.script.js
: Handles the UI and fetch requests.api/weather.js
: Serverless function for weather data.