A flask based web application to manage pollution data recorded by the pollution monitoring system.
This project is being made under Design Practicum IIT Mandi.
Deployed to Heroku at https://pollution-monitor-flask.herokuapp.com.
-
Fork the repository.
-
Clone the forked repository.
git clone https://github.com/user-name/pollution-monitor.git
- Enter the repository.
cd pollution-monitor
-
Create a python virtual environment with
python=python3
. -
Activate the virtual environment.
-
Install required python packages from requirements.txt.
pip install -r requirements.txt
-
Download and install PostgreSQL.
-
Create database
pollution_db
in psql. Refer here. -
Set environment variables.
export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://localhost/pollution_db"
- Remove folder
migrations
and migrate database.
rm -rf migrations
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
- Deploy app.
python manage.py runserver
- Visit URL http://127.0.0.1:5000/