[go: up one dir, main page]

Skip to content

The Weather App is a web application that provides real-time weather information for different locations.

Notifications You must be signed in to change notification settings

Kiran1689/full-stack-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

full-stack-weather-app

This is a simple weather application that allows users to get weather information for a specific location.

Prerequisites

  • Python 3.8 or higher
  • Node.js
  • npm (Node Package Manager)

Installation

  1. Clone the repository to your local machine:

  2. Change to the project directory:

    • cd full-stack-weather-app
  3. Backend Setup:

  • Create and activate a virtual environment (optional but recommended):

    • python -m venv env
    • source env/bin/activate # for Linux/Mac
    • env\Scripts\activate # for Windows
  • Install the Python dependencies:

    • cd weather_backend
    • pip install -r requirements.txt
  • Create a .env file in the weather_api directory and define the following environment variables:

    • API_KEY = your-api-key
  1. Frontend Setup:
  • Install the required Node.js packages:
    • cd front-end
    • npm install

Usage

  1. Start the Django server:
  • cd weather_backend
  • python manage.py runserver
  1. Start the React development server in a separate terminal:
  • cd front-end
  • npm start
  1. Open your web browser and navigate to http://localhost:3000 to access the Weather Application.

  2. Enter a location in the search box to get the weather information for that location.

API Key

  • The application requires an API key to fetch weather data. You can obtain a free API key by signing up on a weather data provider's website (e.g., Weatherstack, OpenWeatherMap).

  • Create a .env file in the weather_api directory and define the API_KEY environment variable with your obtained API key

  • Please make sure to replace <your-api-key> with the actual API key obtained from the weather data provider.

To visit live click here 👉 : Weather App

Make sure device location is turned ON