going-further/cmd/furthur/main.go
2024-04-22 21:53:20 -04:00

27 lines
420 B
Go

package 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()
}