示例#1
0
# app is a variable inside the file __init__.py in side of
# the app_folder directory.
from app_folder import app
app.run(debug=True)
示例#2
0
"""Project Entry Point."""
import sys
from app_folder import app, db

if __name__ == '__main__':
    if '--setup' in sys.argv:
        with app.app_context():
            db.create_all()
            db.session.commit()
            print("Database tables created")

    else:
        app.run(host='localhost', port=5000)
示例#3
0
from app_folder import app
app.run()
示例#4
0
#!flask/bin/python3
import time
import logging

from app_folder import app

logging.basicConfig(level=logging.INFO)

# while True:
try:
    app.run(host="0.0.0.0", port=5000, debug=True)
except KeyboardInterrupt:
    logging.info("The module was stopped")
except Exception as err:
    logging.exception("The module was failed {}".format(err))
finally:
    time.sleep(1)
示例#5
0
#! /usr/bin/env python
from app_folder import app

app.run(host='0.0.0.0', port=5000, debug=True)