This is a simple Weather App built using Node.js, Express, Handlebars, and Vercel. The app allows users to check the weather by entering their location.
The Weather App provides current weather information for a given location. Users can enter their location to receive weather updates.
To install and run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/weather-app.git cd weather-app
-
Install dependencies:
npm install
-
Create environment variables:
Create a
.env
file in the root directory and add your API keys:GEOCODE_API_KEY=your_geocode_api_key FORECAST_API_KEY=your_forecast_api_key
-
Run the server:
npm start
-
Visit the app in your browser:
Open http://localhost:3000 to view it in the browser.
- Home Page: Displays the main interface where users can navigate to different sections.
- About Page: Provides information about the project.
- Weather Page: Users can enter their location to get current weather information.
- Help Page: Offers guidance on how to use the app and navigate the site.
This project is configured to be deployed on Vercel. Follow these steps to deploy:
-
Install Vercel CLI (if not already installed):
npm install -g vercel
-
Deploy to Vercel:
vercel
-
Follow the prompts to complete the deployment.
Here is an overview of the project directory structure:
/project-root /public /js app.js # Client-side JavaScript /css styles.css # Custom CSS styles help.html # Help page /src app.js # Express server setup /utils geocode.js # Geocoding utility forecast.js # Weather forecast utility /Templates /views index.hbs # Home page template about.hbs # About page template help.hbs # Help page template weather.hbs # Weather page template 404.hbs # 404 error page template /partials header.hbs # Header partial template footer.hbs # Footer partial template package.json # Project dependencies and scripts vercel.json # Vercel configuration file README.md # Project documentation
- Name: Gideon Suttle
Feel free to create issues or pull requests if you find any bugs or want to contribute to the project.