MuAladdinIbrahim / air-quality

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License

About The Project

The aim of this project is to provide users who care about environment with air quality/pollution data for their lovely cities, to keep their eyes on pollution rates and be helpful to decrease those rates.

(back to top)

Built With

I've build this project using:

Node Typescript Mongo Jest Express

(back to top)

Getting Started

Prerequisites

You need to have Node.js, typescipt and MongoDB on your machine.
Also, you'll need to install npm or yarn to run the project

  • npm
    npm install -g npm@latest
  • yarn
    npm install -g yarn

Installation

  1. Clone the repo
    git clone https://github.com/MuAladdinIbrahim/air-quality.git
  2. Install NPM packages
    yarn install
  3. Make sure your MongoDB server is up
  4. Update .env files with your values
    • You'll need to generate your key from iqair here

(back to top)

Usage

The application contains endpoints and a cron job,
To check all available endpoints, please refer to the OpenApi Documentation. You may use Swagger Editor to render the file.
The cron job is respoinsible for getting air quality data for Paris city every minute and store it into database. This data is used later to get most polluted data and time for Paris.

  1. Run tests to make sure all is good
    yarn test
  2. Run the application
    • in dev mode
      yarn dev
    • in production mode
      yarn start
  3. Finally, to run cron-job for Paris area, run in a separate terminal
        yarn cron:paris

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License.

(back to top)

About


Languages

Language:TypeScript 100.0%