Пример #1
0
from library import app

print("running main")

if __name__ == "__main__":
    app.run(debug=True)
Пример #2
0
from library import app

app.run(debug=True, host="0.0.0.0")
Пример #3
0
#!/usr/bin/env python


from library import app, db

if __name__ == "__main__":
    app.debug = True
    db.create_all(app=app)
    app.run()
Пример #4
0
from library import app
app.run(debug=True)
Пример #5
0
from library import app
from library.controllers.AuthorController import author
from library.controllers.BookController import book
from library.controllers.RubricController import rubric


def register_blueprints(app):
    app.register_blueprint(author)
    app.register_blueprint(book)
    app.register_blueprint(rubric)


register_blueprints(app)

if __name__ == "__main__":
    app.run(debug=True, port='5000', host='localhost')
Пример #6
0
from library import app

app.run(debug=False)
Пример #7
0
from library import app
import logging as logger

logger.basicConfig(level="DEBUG")

app.config.from_pyfile('config.py')

if __name__ == '__main__':
    logger.info("Starting the application on port: %s" % (app.config["PORT"]))
    app.run(host=app.config["HOST"], port=app.config["PORT"])
Пример #8
0
from library import app

if __name__ == "__main__":
    app.debug = True
    app.run(host='localhost', port=5000)
Пример #9
0
from library import app
app.run(debug=True, port=8000, host='0.0.0.0')
Пример #10
0
"""
Must have run the following in terminal:
from library import db
db.create_all()
"""
import argparse

from library import app


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('--port', type=int, help='the port', default=5000)
    args = parser.parse_args()

    app.run(port=args.port)
    #app.run(debug=True, port=args.port)
Пример #11
0
from library import app

if __name__ == "__main__":
    app.run()
Пример #12
0
import os

from library import app

if __name__ == '__main__':
    app.debug = True
    host = os.environ.get('IP', '127.0.0.1')
    port = int(os.environ.get('PORT', 5000))
    app.run(host=host, port=port)