26 lines
543 B
Python
26 lines
543 B
Python
from sanic import Sanic
|
|
|
|
from environs import Env
|
|
|
|
from bifrost.settings import Settings
|
|
|
|
app = Sanic(__name__, load_env='BIFROST_')
|
|
|
|
|
|
def init():
|
|
env = Env()
|
|
env.read_env()
|
|
|
|
app.config.from_object(Settings)
|
|
|
|
from bifrost.views import update_view
|
|
app.add_route(update_view, '/update', methods=['GET'])
|
|
|
|
app.run(host='0.0.0.0', port=8000, debug=True, access_log=True)
|
|
app.run(
|
|
host=app.config.HOST,
|
|
port=app.config.PORT,
|
|
debug=app.config.DEBUG,
|
|
access_log=app.config.ACCESS_LOG
|
|
)
|