-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (24 loc) · 741 Bytes
/
main.py
File metadata and controls
29 lines (24 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from flask import Flask
from database import register_db
from flask_bootstrap import Bootstrap
from flask_debug import Debug
from flask_session import Session
from nav import nav
from bundle import apply_assets
app = Flask(__name__)
app.config.from_object('config.DevConfig')
session = Session(app)
register_db(app, app.session_interface.db) # mix session interface db session with the project db session
nav.init_app(app)
Bootstrap(app)
apply_assets(app)
Debug(app)
from api import api_app
from frontend import frontend_app
app.register_blueprint(api_app, url_prefix='/api')
app.register_blueprint(frontend_app, url_prefix='/app')
@app.route('/')
def hello_world():
return 'Hello, world!'
if __name__ == '__main__':
app.run()