27 lines
420 B
Go
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()
|
|
}
|