16 lines
331 B
Python
16 lines
331 B
Python
from flask import Flask, g
|
|
from app.keep import keep
|
|
|
|
|
|
app = Flask(__name__)
|
|
app.register_blueprint(keep)
|
|
|
|
|
|
@app.teardown_appcontext
|
|
def close_connection(exception):
|
|
db = getattr(g, "_database", None)
|
|
if db is not None:
|
|
db.close()
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host = "0.0.0.0", debug = True, port = 5050) |