compass-core/bin/runserver.py
xiaodongwang 7f080e4e51 fix pep8 warning and move major util code from bin to compass dir.
Change-Id: I7baa536888db1ca46cadcdf07ef9cc0a1a3a12fb
2014-02-19 22:25:45 -08:00

23 lines
548 B
Python
Executable File

#!/usr/bin/python
"""main script to start an instance of compass server ."""
import logging
from compass.api import app
from compass.utils import flags
from compass.utils import logsetting
flags.add('server_host',
help='server host address',
default='0.0.0.0')
flags.add_bool('debug',
help='run in debug mode',
default=True)
if __name__ == '__main__':
flags.init()
logsetting.init()
logging.info('run server')
app.run(host=flags.OPTIONS.server_host, debug=flags.OPTIONS.debug)