mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-23 23:55:02 +01:00
add webhook service
This commit is contained in:
7
main.go
7
main.go
@@ -168,6 +168,13 @@ func main() {
|
||||
// Subscribe to LND invoice updates in the background
|
||||
go svc.InvoiceUpdateSubscription(context.Background())
|
||||
|
||||
//Start webhook subscription
|
||||
if svc.Config.WebhookUrl != "" {
|
||||
webhookCtx, cancelWebhook := context.WithCancel(context.Background())
|
||||
go svc.StartWebhookSubscribtion(webhookCtx)
|
||||
defer cancelWebhook()
|
||||
}
|
||||
|
||||
//Start Prometheus server if necessary
|
||||
var echoPrometheus *echo.Echo
|
||||
if svc.Config.EnablePrometheus {
|
||||
|
||||
Reference in New Issue
Block a user