Skip to content

nickbennings/Weather-Forecasting-Directions-Website

Repository files navigation

Weather Forecasting & Directions Website

This is a simple website that allows users to input a city name and retrieve the current weather information using the OpenWeatherMap API. Also users can enter a start and end location and get direction information using the OpenRouteService API.

Features

  • Input field to enter a city name for weather data
  • Display of current temperature and weather condition for the entered city
  • Error handling for invalid city names or failed API requests
  • Input fields to enter start and end locations for direction data
  • Display of directions from the start location to the end location
  • Error handling for invalid address locations or failed API requests

Usage

  1. Enter the name of a city in the input field.
  2. Click the "Get Weather" button to retrieve the current weather information for the entered city.
  3. The current temperature and weather condition will be displayed below the input field.
  4. Enter the start and end location for direction data
  5. Click the "Get Directions" button to retrieve the current direction information for the entered locations.
  6. The directions and travel time will be displayed below the input field.

Setup

  1. Clone this repository to your local machine.
  2. Create a .env file in the root directory of the project and add your OpenWeatherApp and OpenRouteService API key:
    API_KEY=your_api_key_here
    
  3. Ensure .env is added to .gitignore to prevent it from being pushed to the repository.
  4. Install the necessary packages:
    npm install
  5. Start the server:
    node server.js
  6. Open your browser and navigate to http://localhost:3000 to view the website.

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • Node.js
  • Express
  • OpenWeatherMap API
  • OpenRouteService API

Credits

This project was created by Nick Bennings.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published