holonet
- 19 commits
- 1 branch
- 0 tags
- updated
server.go
594 B · 33 lines
1// internal/holonet/server.go2// purpose: 3// author: daniel daum4package56import (7 "fmt"8 "net/http"910 "git.danieldaum.net/daniel-daum/holonet/internal/config"11)1213// setup control pane http server14// pull and provide configs15func holonet() *http.Server {16 settings := config.LoadSettings()1718 fmt.Printf("HOST IS SET: %s\n", settings.HOST)19 fmt.Printf("PORT IS SET: %s\n", settings.PORT)20 fmt.Printf("ENV IS SET: %s\n", settings.ENV)2122 fmt.Println("STARTING SERVER")23 s := &http.Server{}2425 return s26}2728// start server29// wrap in graceful shutdown30func Serve() {3132 holonet().ListenAndServe()33}