2019-02-23 21:19:00 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
from flask import Flask
|
|
|
|
|
|
|
|
from platypush.backend.http.utils import HttpUtils
|
|
|
|
from platypush.backend.http.app.utils import get_routes
|
|
|
|
|
|
|
|
|
|
|
|
## Webapp initialization
|
|
|
|
|
|
|
|
base_folder = os.path.abspath(os.path.join(
|
|
|
|
os.path.dirname(os.path.abspath(__file__)), '..'))
|
|
|
|
|
|
|
|
template_folder = os.path.join(base_folder, 'templates')
|
|
|
|
static_folder = os.path.join(base_folder, 'static')
|
|
|
|
|
2019-02-24 00:11:35 +01:00
|
|
|
application = Flask('platypush', template_folder=template_folder,
|
|
|
|
static_folder=static_folder)
|
2019-02-23 21:19:00 +01:00
|
|
|
|
|
|
|
for route in get_routes():
|
2019-02-24 00:11:35 +01:00
|
|
|
application.register_blueprint(route)
|
2019-02-23 21:19:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
# vim:sw=4:ts=4:et:
|