mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-22 19:34:18 +01:00
Allow to start wallet API by cashu --daemon (#243)
* Allow to start wallet API by cashu --daemon * Provide access to wallet name via settings * Make format * Use flag is_eager for daemon option * add setting api_host --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
13
cashu/wallet/api/api_server.py
Normal file
13
cashu/wallet/api/api_server.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import uvicorn
|
||||
|
||||
from ...core.settings import settings
|
||||
|
||||
|
||||
def start_api_server(port=settings.api_port, host=settings.api_host):
|
||||
config = uvicorn.Config(
|
||||
"cashu.wallet.api.app:app",
|
||||
port=port,
|
||||
host=host,
|
||||
)
|
||||
server = uvicorn.Server(config)
|
||||
server.run()
|
||||
Reference in New Issue
Block a user