Moravec Backend. Learn more about this project:
- TEDx talk about Moravec by Federico Zimmerman
- Review by "El gato y la caja"
- Download at Google Play - old version
First make sure you have VirtualEnvWrapper and MongoDB installed.
mkvirtualenv dennett
workon dennett
pip install -r requirements.txt
Create a file containing these environment variables:
DEVELOPMENT=True
DEBUG=True
TESTING=False
DB_COLLECTION_V1=data-v1
DB_COLLECTION_V2=data-v2
MONGO_DBNAME=your-mongo-database-name
MONGO_URI=your-mongo-uri
SECRET_KEY=some-secret-key
For example, some possible values for the last three variables could be:
MONGO_DBNAME=dennett
MONGO_URI=mongodb://localhost:27017/dennett
SECRET_KEY=642342617b264d49b5bb4facc4b3124fa8ac8f5781ad2219
You can create that file anywhere in your filesystem. A suggested location could be ~/dennett/config/develop In any case, make sure NOT to track this file with git.
workon dennett
export $(cat ~/dennett/config/develop) # replace path with location of your configuration file
python app.py # run development server
With the development server already running, open a new terminal and type:
workon dennett
export $(cat ~/dennett/config/develop) # replace path with location of your configuration file
python populate.py
WARNING: Running the test suite will destroy local database!
With the development server already running, open a new terminal and type:
pytest
This server accepts any JSON input on URL api/v2/trials
. No format/schema validation is done.
Contributions are more than welcome. Here's a list of fundamenetal knowledge you'll need to get started.