2gis/badger-api

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

Homepage:

Size: 144

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Badger-api Build Status Coverage Status

Badger-api is an open source backend service (REST API) for Badger (AngularJS web UI).

Installation

Development version | Deploy to Heroku

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/

Usage

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/

Secret key

For production usage you need secret key. Don't forget to generate it and add to .env


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.