-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.py
36 lines (28 loc) · 822 Bytes
/
blog.py
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
30
31
32
33
34
35
36
import os
from flask import Flask
from controllers import account
from controllers import static
from controllers import admin
from controllers import fe
from appconfig import *
from flask.ext.compress import Compress
account_api = account.account_api
static_api = static.static_api
admin_api = admin.admin_api
fe = fe.fe
app = Flask(__name__)
Compress(app)
app.register_blueprint(account_api)
app.register_blueprint(static_api)
app.register_blueprint(admin_api)
app.register_blueprint(fe)
app.config.from_object(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://'+USER+':'+PASS+'@'+HOST+'/'+DATABASE
app.config.update(dict(
DEBUG=True,
SECRET_KEY='0209012'
)
)
app.config.from_envvar("APP_SETTINGS", silent=True)
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True, port=5000)