Skip to content

Instantly share code, notes, and snippets.

@tswicegood
Forked from hhuuggoo/gunicorn
Created November 21, 2014 17:03
Show Gist options
  • Save tswicegood/be68e7315cdd5820230d to your computer and use it in GitHub Desktop.
Save tswicegood/be68e7315cdd5820230d to your computer and use it in GitHub Desktop.
import os
from os.path import join
from blaze.server import Server
from bambooclient import Client, autoload
def make_app():
basedir = os.environ.get('BAMBOO_BASEDIR', os.getcwd())
data_filename = os.environ.get('BAMBOO_DATAFILE', False)
if data_filename is False:
data_filename = join(basedir, 'data')
data = autoload(data_filenamae)
server = Server(dict(data))
c = Client("http://localhost:6001/", "admin")
c.connect('password')
c.setup_blaze_server(server, "http://localhost:6363/")
return server.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment