Skip to content

RemotelyGreenOrg/co2-calculator-api

Repository files navigation

Co2 Calculator API

Local Development

Using Docker

To build the application container, use

docker build . -t co2-calculator-api

You can then start the app and database containers using:

docker compose up --detach

Or just start the database using:

docker-compose up --detach database

Using Locally installed Python and Postgres

The project runs with Python 3.10.1.

Install packages:

pip install -r requirements.txt

Run the local development server:

uvicorn app.main:app --reload --reload-dir app --log-level debug

Deployment

The API is hosted on Heroku at co2-calculator-api.herokuapp.com

git push https://git.heroku.com/co2-calculator-api.git main