works again!
This commit is contained in:
parent
297b8f4e1a
commit
10a2e7723d
@ -26,11 +26,14 @@ func main() {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
ms := merp.NewMerpServer()
|
||||
log.Info().Msg("calling serveforever")
|
||||
ms.ServeForever()
|
||||
log.Info().Msg("back from serveforever")
|
||||
wg.Done()
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
log.Info().Msg("done waiting on waitgroup")
|
||||
}
|
||||
|
||||
func identify() {
|
||||
|
@ -55,7 +55,7 @@ func (ms *MerpServer) init() {
|
||||
ms.setupRoutes()
|
||||
|
||||
ms.server = &http.Server{
|
||||
Addr: fmt.Sprintf(":%s", ms.port),
|
||||
Addr: fmt.Sprintf(":%d", ms.port),
|
||||
Handler: ms.gin,
|
||||
ReadTimeout: 10 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
@ -69,7 +69,10 @@ func (ms *MerpServer) connectDB() {
|
||||
|
||||
// ServeForever causes merp to serve http forever
|
||||
func (ms *MerpServer) ServeForever() {
|
||||
ms.server.ListenAndServe()
|
||||
err := ms.server.ListenAndServe()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (ms *MerpServer) HealthCheckHandler() http.HandlerFunc {
|
||||
|
Loading…
Reference in New Issue
Block a user