Пример #1
0
from app.startup.init_app import init_app

init_app(app, db)


# celery config
from celery import Celery
def make_celery(app):
  celery = Celery(app.import_name, broker=app.config['CELERY_BROKER_URL'])
  celery.conf.update(app.config)
  return celery

app.config.update(
  CELERY_BROKER_URL='redis://localhost:6379/0',
  CELERY_RESULT_BACKEND='redis://localhost:6379/0'
)

celery = make_celery(app)
app.celery = celery


# startup provisioning
from app.provisioning.startup import init_app
init_app(app, db)


# Start a development web server if executed from the command line
if __name__ == "__main__":
    app.run(host='0.0.0.0', port=5555, debug=True)

Пример #2
0
from app.app_and_db import app, db

if __name__ == "__main__":
    app.run(port=9001, debug=True)
Пример #3
0
# This file starts the WSGI web application.
# - Heroku starts gunicorn, which loads Procfile, which starts runserver.py
# - Developers can run it from the command line: python runserver.py

from app.app_and_db import app, db
from app.startup.init_app import init_app

init_app(app, db)

# Start a development web server if executed from the command line
if __name__ == "__main__":
    app.run(port=5000, debug=True)
Пример #4
0
from app.app_and_db import app, db

if __name__ == "__main__":
  app.run(port=9001, debug=True)
Пример #5
0
from app.app_and_db import app, db
from app.init_app import init_app


init_app(app, db)


# from app.reset_db import reset_db
# reset_db(app, db)

if __name__ == '__main__':
    app.run('127.0.0.1', 5000, 1)
Пример #6
0
from app.app_and_db import app, db

@app.before_first_request
def create_database():
  db.create_all()

if __name__ == "__main__":
  app.run(port=app.config['PORT'], debug=app.config['DEBUG'])
Пример #7
0
#!/Users/lingthio/envs/glamdring/bin/python

# The 'runserver.py' file is used to run a Flask application
# using the development WSGI web server provided by Flask.
# Run 'python runserver.py' and point your web browser to http://localhost:5000/


from app.app_and_db import app, db
from app.startup.init_app import init_app
import os
from flask_sslify import SSLify
from OpenSSL import SSL
from flask_user import UserManager, SQLAlchemyAdapter
from app.users.models import User

init_app(app, db)
#sslify = SSLify(app)
from werkzeug.contrib.fixers import ProxyFix

app.wsgi_app = ProxyFix(app.wsgi_app)
if __name__ == 'main' or __name__ == "__main__":
	app.run(debug=False, port=4000)
Пример #8
0
from app.app_and_db import app, db
from app.init_app import init_app
from app.reset_db import reset_db

init_app(app)

#reset_db(app, db)

if __name__ == '__main__':
    app.run('127.0.0.1', 5001, 1)
Пример #9
0
from app.app_and_db import app, db
from app.startup.init_app import init_app

init_app(app, db)



if __name__ == "__main__":
    app.run(port=8003, debug=True)