Table of Contents
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.
I've build this project using:
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
- Clone the repo
git clone https://github.com/MuAladdinIbrahim/air-quality.git
- Install NPM packages
yarn install
- Make sure your MongoDB server is up
- Update .env files with your values
- You'll need to generate your key from iqair here
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.
- Run tests to make sure all is good
yarn test
- Run the application
- in dev mode
yarn dev
- in production mode
yarn start
- in dev mode
- Finally, to run cron-job for Paris area, run in a separate terminal
yarn cron:paris
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License.