Giter VIP home page Giter VIP logo

weather_forecast_web_app's Introduction

Weather App

Welcome to the Weather App, a simple web application for checking the weather forecast of different locations.

Table of Contents

Prerequisites

Make sure you have the following installed before setting up the project:

  • Node.js
  • MongoDB

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/weather-app.git
    cd weather-app
    
  2. Navigate to the backend and frontend directories separately:

    cd backend_server/
    
    cd frontend_app/
    
  3. Install the required npm packages:

    npm install
    

API Key Setup

To obtain a Weather API key, visit WeatherAPI and follow the instructions to create an account.

Running the Backend

  1. Navigate to the backend folder:

    cd backend_server/
    
  2. Generate your Weather API key from the link provided in the above section.

  3. Create a .env file in the root of the backend folder with the following content:

    WEATHER_API_KEY=your-weather-api-key
    MONGODB_URI=your-mongodb-uri
    PORT=your-port
    
  4. Start the backend server:

    nodemon
    

Running the Frontend

  1. Ensure that the backend server is up and running.

  2. Navigate to the frontend folder:

    cd frontend_app/
    
  3. Start the frontend application:

    npm run dev
    
  4. Open your browser and go to the URL provided in the terminal.

Adding Locations

  1. Ensure that the backend server is running.

  2. Use API tools like Postman to add locations. Send a POST request to http://localhost:{your-port}/api/locations with the location details in the request body.

    Example JSON payload:

    {
        "name": "CityName",
        "latitude": 123.456,
        "longitude": 789.012
    }

weather_forecast_web_app's People

Contributors

devanshhooda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.