Example #1
0
#coding:utf-8
"""
app.py
应用入口文件
"""

import urllib
from rmon.app import create_app
from rmon.models import db

app = create_app()


@app.cli.command()
def init_db():
    """
    数据库初始化
    """
    print("sqlite3 database file is %s" % app.config['SQLALCHEMY_DATABASE_UI'])
    db.create_all()
Example #2
0
def app():
    """
    Flask app
    """
    return create_app()
Example #3
0
def app():

    return create_app()
Example #4
0
def app():
    """ Flask app
    """
    config = {'TESTING': True}
    return create_app(config)
Example #5
0
#coding=utf-8

from rmon.app import create_app

app = create_app("production")

if __name__ == "__main__":
    app.run(debug=True)
Example #6
0
def app():
    """ Flask app
    """
    return create_app("development")