Install requirements from requirements.txt, it is recommended to install the packages in a virtualenv.
To run the server run $ python manage.py runserver to play around with the database you can run an interactive python session witht the database with $ python manage.py shell
Initialise a virtualenvironment using the virtualenv command.
virtualenv --distribute --python=/usr/bin/python2.7 edibus
Activate virutalenv:
. venv/bin/activate
Install requirments from the requirements.txt
pip install -r requirements.txt
Now to run the server
python manage.py runserver
To play around with the database you can run:
python manage.py shell
You can test the API with curl: $ curl $ curl http://127.0.0.1:5000/api/buses/NAME Where NAME is the service name.
Connect to the DigitalOcean droplet server through SSH or the DigitalOcean browser-based terminal, login as root. Pull latest backend code, modifying directory paths to absolute ones:
cd /var/www/ec/
git pull
nano /var/www/ec/mongoflask/brain.py //Change 'tfe_api/...txt' to '/var/www/ec/mongoflask/tfe_api...'
sudo service apache2 restart
The server is accessible from http://178.62.140.115/ , with API calls in the format http://178.62.140.115/api/next/servicename+latitude+longitude+bearing i.e. http://178.62.140.115/api/next/34+34.5754+-3.234+127
To use the application yourself just transfar the .apk you your phone, make sure you have Unknown sources enabled, and through the file explorer install the application.