parser.add_option('-s', '--static-dir', dest='static_dir', metavar='DIR',
default='static',
help='Location of static files (%default)')
+ parser.add_option('-a', '--address', dest='address', default='127.0.0.1',
+ metavar='IP',
+ help='address that the server will bind to')
+ parser.add_option('-p', '--port', dest='port', default='8080',
+ metavar='PORT',
+ help='port that the server will listen on')
parser.add_option('-n', '--name', dest='name', metavar='STRING',
default='dirtag',
help='Name of the dirtag repository')
w = WebInterface(
d, template_dir=options.template_dir, repository_name=options.name)
cherrypy.config.update({
+ 'server.socket_host': options.address,
+ 'server.socket_port': int(options.port),
'tools.encode.on': True,
'tools.encode.encoding': 'utf8',
})