start scaffolding

This commit is contained in:
2024-04-22 21:53:20 -04:00
parent 6e5af42d93
commit d6dc30bea2
11 changed files with 270 additions and 2 deletions

View File

@@ -1,3 +1,26 @@
package main
func main() {}
import (
"log/slog"
"os"
"os/signal"
"git.yetaga.in/alazyreader/going-further/api"
)
func main() {
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)).
With(slog.String("application", "furthur"))
slog.SetDefault(logger)
server := api.NewServer(logger, "8080", "v0.0.1")
start, stop := server.Setup()
start()
c := make(chan os.Signal, 2)
signal.Notify(c, os.Interrupt)
<-c
stop()
}