mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Improve squeaknode entrypoint command (#583)
* Improve squeaknode entrypoint command * Fix pargser in main module
This commit is contained in:
parent
cef4eeca03
commit
c39dbb44f1
5 changed files with 16 additions and 15 deletions
|
|
@ -46,7 +46,7 @@ If you don't already have a bitcoin node or lightning node, you can follow the i
|
|||
|
||||
- Start the squeak server:
|
||||
```
|
||||
$ runsqueaknode --config config.ini run-server
|
||||
$ squeaknode --config config.ini
|
||||
```
|
||||
- Go to http://localhost:12994/ and use the username/password in **config.ini** to log in.
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
$ source venv/bin/activate
|
||||
$ pip install -r requirements.txt
|
||||
$ python setup.py install
|
||||
$ SQUEAKNODE_WEBADMIN_ENABLED=TRUE SQUEAKNODE_WEBADMIN_LOGIN_DISABLED=TRUE SQUEAKNODE_WEBADMIN_ALLOW_CORS=TRUE SQUEAKNODE_NETWORK=testnet runsqueaknode --config config.ini run-server
|
||||
$ SQUEAKNODE_WEBADMIN_ENABLED=TRUE SQUEAKNODE_WEBADMIN_LOGIN_DISABLED=TRUE SQUEAKNODE_WEBADMIN_ALLOW_CORS=TRUE SQUEAKNODE_NETWORK=testnet squeaknode --config config.ini
|
||||
```
|
||||
- Start the frontend in development mode:
|
||||
```
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -102,7 +102,7 @@ setup(
|
|||
extras_require={"test": ["pytest", "coverage"]},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'runsqueaknode = squeaknode.main:main',
|
||||
'squeaknode = squeaknode.main:main',
|
||||
],
|
||||
},
|
||||
cmdclass={
|
||||
|
|
|
|||
|
|
@ -177,13 +177,16 @@ def parse_args():
|
|||
default="info",
|
||||
help="Logging level",
|
||||
)
|
||||
subparsers = parser.add_subparsers(help="sub-command help")
|
||||
# subparsers = parser.add_subparsers(help="sub-command help")
|
||||
|
||||
# create the parser for the "run-server" command
|
||||
parser_run_server = subparsers.add_parser(
|
||||
"run-server", help="run-server help")
|
||||
parser_run_server.set_defaults(func=run_server)
|
||||
# # create the parser for the "run-server" command
|
||||
# parser_run_server = subparsers.add_parser(
|
||||
# "run-server", help="run-server help")
|
||||
# parser_run_server.set_defaults(func=run_server)
|
||||
|
||||
# return parser.parse_args()
|
||||
|
||||
parser.set_defaults(func=run_node)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
|
@ -215,7 +218,7 @@ def main():
|
|||
args.func(config)
|
||||
|
||||
|
||||
def run_server(config):
|
||||
def run_node(config):
|
||||
# load the network
|
||||
network = config.core.network
|
||||
SelectParams(network)
|
||||
|
|
|
|||
|
|
@ -13,12 +13,10 @@ sleep 10
|
|||
|
||||
# Start using the run server command
|
||||
if [ -f config.ini ]; then
|
||||
exec runsqueaknode \
|
||||
exec squeaknode \
|
||||
--config config.ini \
|
||||
--log-level INFO \
|
||||
run-server
|
||||
--log-level INFO
|
||||
else
|
||||
exec runsqueaknode \
|
||||
--log-level INFO \
|
||||
run-server
|
||||
exec squeaknode \
|
||||
--log-level INFO
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue