nopaque/nopaque.py

35 lines
808 B
Python
Raw Normal View History

# First things first: apply monkey patch, so that no code gets executed without
# patched libraries!
2019-08-26 12:21:06 +00:00
import eventlet
eventlet.monkey_patch()
from app import db, cli, create_app, socketio # noqa
from app.models import (Corpus, CorpusFile, Job, JobInput, JobResult,
QueryResult, Role, User) # noqa
2019-07-03 08:31:23 +00:00
app = create_app()
cli.register(app)
@app.shell_context_processor
def make_shell_context():
return {'Corpus': Corpus,
'CorpusFile': CorpusFile,
'db': db,
'Job': Job,
'JobInput': JobInput,
'JobResult': JobResult,
'QueryResult': QueryResult,
'Role': Role,
2020-06-05 12:42:04 +00:00
'User': User}
2019-07-08 08:52:36 +00:00
if __name__ == '__main__':
host = '0.0.0.0'
port = 5000
socketio.run(app, host=host, port=port)