parser.add_argument('-datadir', default=config.DEFAULT_DATADIR) parser.add_argument('-conf', default='lightning.conf') add_switch('debug') parser.add_argument('-port') args = parser.parse_args() conf = config.lightning_config(args=vars(args), datadir=args.datadir, conf=args.conf) with open(os.path.join(conf['datadir'], conf['pidfile']), 'w') as pid_file: pid_file.write(str(os.getpid())) if conf.getboolean('regtest'): bitcoin.SelectParams('regtest') else: raise Exception("Non-regnet use not supported") port = conf.getint('port') app.config['secret'] = b'correct horse battery staple' + bytes(str(port), 'utf8') app.config.update(conf) app.config['bitcoind'] = bitcoin.rpc.Proxy('http://%s:%s@localhost:%d' % (conf['bituser'], conf['bitpass'], int(conf['bitport']))) app.config['SQLALCHEMY_BINDS'] = {} app.register_blueprint(channel.API) app.register_blueprint(lightning.API) app.register_blueprint(local.API) app.run(host="0.0.0.0", port=port, debug=conf.getboolean('debug'), use_reloader=False, processes=3)
parser.add_argument('-port') args = parser.parse_args() conf = config.lightning_config(args=vars(args), datadir=args.datadir, conf=args.conf) with open(os.path.join(conf['datadir'], conf['pidfile']), 'w') as pid_file: pid_file.write(str(os.getpid())) if conf.getboolean('regtest'): bitcoin.SelectParams('regtest') else: raise Exception("Non-regnet use not supported") port = conf.getint('port') app.config['secret'] = b'correct horse battery staple' + bytes( str(port), 'utf8') app.config.update(conf) app.config['bitcoind'] = bitcoin.rpc.Proxy( 'http://%s:%s@localhost:%d' % (conf['bituser'], conf['bitpass'], int(conf['bitport']))) app.config['SQLALCHEMY_BINDS'] = {} app.register_blueprint(channel.API) app.register_blueprint(lightning.API) app.register_blueprint(local.API) app.run(port=port, debug=conf.getboolean('debug'), use_reloader=False, processes=3)
parser.add_argument('-datadir', default=config.DEFAULT_DATADIR) parser.add_argument('-conf', default='lightning.conf') add_switch('debug') parser.add_argument('-port') args = parser.parse_args() conf = config.lightning_config(args=vars(args), datadir=args.datadir, conf=args.conf) with open(os.path.join(conf['datadir'], conf['pidfile']), 'w') as pid_file: pid_file.write(str(os.getpid())) if conf.getboolean('regtest'): bitcoin.SelectParams('regtest') else: raise Exception("Non-regnet use not supported") app.config.update(conf) app.debug = conf.getboolean('debug') app.logger.setLevel(app.logger.getEffectiveLevel()) port = conf.getint('port') app.config['bitcoind_address'] = ('http://%s:%s@localhost:%d' % (conf['bituser'], conf['bitpass'], int(conf['bitport']))) app.config['bitcoind'] = bitcoin.rpc.Proxy(app.config['bitcoind_address']) app.register_blueprint(channel.API) app.register_blueprint(local.API) app.run(port=port, debug=True, use_reloader=False, threaded=True)
parser.add_argument('-datadir', default=config.DEFAULT_DATADIR) parser.add_argument('-conf', default='lightning.conf') add_switch('debug') parser.add_argument('-port') args = parser.parse_args() conf = config.lightning_config(args=vars(args), datadir=args.datadir, conf=args.conf) with open(os.path.join(conf['datadir'], conf['pidfile']), 'w') as pid_file: pid_file.write(str(os.getpid())) if conf.getboolean('regtest'): bitcoin.SelectParams('regtest') else: raise Exception("Non-regnet use not supported") app.config.update(conf) app.debug = conf.getboolean('debug') app.logger.setLevel(app.logger.getEffectiveLevel()) port = conf.getint('port') app.config['bitcoind_address'] = ( 'http://%s:%s@localhost:%d' % (conf['bituser'], conf['bitpass'], int(conf['bitport']))) app.config['bitcoind'] = bitcoin.rpc.Proxy(app.config['bitcoind_address']) app.register_blueprint(channel.API) app.register_blueprint(local.API) app.run(port=port, debug=True, use_reloader=False, threaded=True)