p.add_option('-a', '--address', dest='address', default='127.0.0.1',
metavar='ADDR',
help='Address that the server will bind to (%default).')
- p.add_option('-p', '--port', dest='port', default='8080',
+ p.add_option('-p', '--port', dest='port', default=8080, type='int',
metavar='PORT',
help='Port that the server will listen on (%default).')
p.add_option('-s', '--secure', dest="secure",
if cherrypy.__version__.startswith('3.'):
cherrypy.config.update({ # http://www.cherrypy.org/wiki/ConfigAPI
'server.socket_host': self.options.address,
- 'server.socket_port': int(self.options.port),
+ 'server.socket_port': self.options.port,
'tools.decode.on': True,
'tools.encode.on': True,
'tools.encode.encoding': 'utf8',
else:
digest_auth = {
'tools.auth_digest.on': True,
- 'tools.auth_digest.realm': 'cookbook',
+ 'tools.auth_digest.realm': 'chemdb',
'tools.auth_digest.get_ha1': get_ha1,
'tools.auth_digest.key': str(uuid.uuid4()),
}
else:
digest_auth = {
'tools.digest_auth.on': True,
- 'tools.digest_auth.realm': 'cookbook',
+ 'tools.digest_auth.realm': 'chemdb',
'tools.digest_auth.users': passwds,
}
app_config = {