-
-
Save tswicegood/be68e7315cdd5820230d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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