Name: badger-api
Owner: 2GIS
Description: Open source backend service (REST API) for Badger
Created: 2015-10-07 04:24:23.0
Updated: 2016-10-27 00:53:58.0
Pushed: 2018-05-24 11:50:41.0
Size: 144
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Badger-api is an open source backend service (REST API) for Badger (AngularJS web UI).
Install dependencies:
pt-get install -y python3 python3-dev python3-pip python3-setuptools python-virtualenv python-tox
pt-get install -y libpq-dev libcurl4-openssl-dev libsasl2-dev
Clone repository:
it clone https://github.com/2gis/badger-api.git
d badger-api
Install Vagrant, Docker and type:
agrant up
Vagrant will start two Docker containers with postgresql and rabbitmq.
Install requirements and run tests:
ox
Activate virtual env:
ource .tox/py34/bin/activate
Install dev requirements and create database model:
ip install -r dev-requirements.txt
oncho run ./manage.py syncdb
Run api + celery:
oncho start -f Procfile.dev
Now your api is available at http://localhost:8000/api/
To start adding content to api, you need a user. Run following command to create it:
oncho run ./manage.py createsuperuser
The Django admin site is available at http://localhost:8000/admin/
For production usage you need secret key. Don't forget to generate it and add to .env