mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
4bb96b28de
Introduces the "rest" module, with reusable utils for flask applications (will be packaged as a flask extension later on).
23 lines
366 B
Python
23 lines
366 B
Python
from web import main, db, mail
|
|
from api import api
|
|
|
|
from flask import *
|
|
|
|
app = Flask(__name__)
|
|
app.config.from_object("default_settings")
|
|
app.register_blueprint(main)
|
|
app.register_blueprint(api)
|
|
|
|
# db
|
|
db.init_app(app)
|
|
db.app = app
|
|
db.create_all()
|
|
|
|
# mail
|
|
mail.init_app(app)
|
|
|
|
def main():
|
|
app.run(host="0.0.0.0", debug=True)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|