This commit is contained in:
2022-01-08 11:40:11 -06:00
parent 6fd10c616d
commit 84ebae8a29
8 changed files with 928 additions and 0 deletions

28
cmd/tpapi/main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"log"
"os"
"os/signal"
"syscall"
)
func forever() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
sig := <-c
log.Printf("[INFO] shutting down, detected signal: %s", sig)
}
func main() {
initialize()
defer func() {
log.Println("[DEBUG] shutdown sequence complete")
}()
go httpServer(config.WebSrvIP, config.WebSrvPort)
forever()
}