Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
from app_folder import app
app.run()
Ejemplo n.º 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)
Ejemplo n.º 5
0
#! /usr/bin/env python
from app_folder import app

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