mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
35 lines
808 B
Python
35 lines
808 B
Python
# First things first: apply monkey patch, so that no code gets executed without
|
|
# patched libraries!
|
|
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
|
|
|
|
|
|
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,
|
|
'User': User}
|
|
|
|
|
|
if __name__ == '__main__':
|
|
host = '0.0.0.0'
|
|
port = 5000
|
|
socketio.run(app, host=host, port=port)
|