mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 18:44:20 +01:00
* 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>
14 lines
288 B
Python
14 lines
288 B
Python
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()
|