from library import app print("running main") if __name__ == "__main__": app.run(debug=True)
from library import app app.run(debug=True, host="0.0.0.0")
#!/usr/bin/env python from library import app, db if __name__ == "__main__": app.debug = True db.create_all(app=app) app.run()
from library import app app.run(debug=True)
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')
from library import app app.run(debug=False)
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"])
from library import app if __name__ == "__main__": app.debug = True app.run(host='localhost', port=5000)
from library import app app.run(debug=True, port=8000, host='0.0.0.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)
from library import app if __name__ == "__main__": app.run()
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)