Skip to content

tribesat/backend

Repository files navigation

Backend

Build Status codecov

Tribesat server

Dependencies

Developing

First time setup

virtualenv -p python3.6 .pyenv # create virtualenv
source .pyenv/bin/activate     # activate virtualenv
make develop                   # install requirements
./bin/server                   # start the server

After this, whenever you are developing, you simply need to activate your virtual env and then start the server

source .pyenv/bin/activate # activate virtualenv
./bin/server               # start the server

The server will restart automatically whenever you edit a file.

Running

To run in production, use gunicorn

make                         # install
gunicorn tribesat.server:app # run

Database

We use a PostgreSQL

To set up the database install PostgreSQL and then run

make setup-db

There must be a user postgres in the database

The database will be named tribesat

Testing

make test