Arctic Bio Map Server v2
This is the server backend code that is used for communicating with the Arctic Bio Map (ABM) mobile client.
It is also used by the ABM Front-End Portal for visualizing the sightings information for researchers.
This server is written in Python 2.7.
Checkout a copy of the repository from BitBucket. Install Python 2.7 on your system if it is not already; Linux and Mac OS X may already have a copy installed.
$ pip install tornado $ pip install sqlalchemy $ pip install mysql-python
Create a new database in MySQL:
$ mysql -uroot mysql> create database abm; mysql> ^D
Start up a local server with:
$ cd backend $ python server.py DATABASE_URL="" COOKIE=""
DATABASE_URL must be a database connection URL like
COOKIE must be a random hex string. If COOKIE changes, then all users signed into the server through their browser will be logged out.
Tests are available in the
backend/tests directory. They are Shell scripts so will only work on Mac/Unix systems. Be sure to install jq for your OS.
This is a configuration file for Upstart on Ubuntu. Edit the file to point to the location of your production installation and then install the file in
/etc/init. Then you can control the server with
$ sudo initctl status abm-server $ sudo initctl start abm-server $ sudo initctl stop abm-server $ sudo initctl restart abm-server
The script will also automatically start the server when the host starts up.
This project is MIT Licensed.