Added an API listener
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 2m30s
Build and Push Docker Image / build-and-push (push) Successful in 11m56s

This commit is contained in:
2025-04-30 18:34:57 -04:00
parent 1475c7911f
commit d01e6a050f
13 changed files with 445 additions and 25 deletions

View File

@ -12,6 +12,7 @@ import (
"git.savin.nyc/alex/go-receipt-tracker/config"
"git.savin.nyc/alex/go-receipt-tracker/database"
"git.savin.nyc/alex/go-receipt-tracker/hooks/debug"
"git.savin.nyc/alex/go-receipt-tracker/listeners"
"git.savin.nyc/alex/go-receipt-tracker/workers"
)
@ -126,6 +127,12 @@ func main() {
app.Log.Error(err.Error())
}
api := listeners.NewHttpApi(cfg.Listeners[0], db)
err = app.AddListener(api)
if err != nil {
app.Log.Error(err.Error())
}
// err = app.AddHook(new(consul.Hook), &consul.Options{
// Hostname: cfg.Consul.Host,
// Port: cfg.Consul.Port,