Simple full-stack weather app (Node + Express backend, static frontend) that lets users get current weather for any city.
- Search weather by city name
- Backend proxies requests to OpenWeatherMap (keeps API key secret)
- Small, easy-to-read codebase ready to upload to GitHub
- Clone or copy files to a folder.
- Create a file named .envin the project root with:OPENWEATHER_API_KEY=your_openweathermap_api_key_here
- Install dependencies:
npm install
- Start the server:
npm start
- Open http://localhost:3000in your browser.
- This can be deployed to services like Render, Heroku, Railway, Vercel (serverless), etc.
- Make sure to set the OPENWEATHER_API_KEYenvironment variable in your hosting provider.
- The app queries OpenWeatherMap Current Weather API (/data/2.5/weather) and returns metric units.
- You can modify public/app.jsto change UI or show more fields.