mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
🐛 fix: check for errors on HTTP server start
This commit is contained in:
@@ -28,8 +28,12 @@ func StartHTTPServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
port := config.AppConfig.HTTP.Port
|
port := config.AppConfig.HTTP.Port
|
||||||
|
err := http.ListenAndServe(fmt.Sprintf(":%d", port), router)
|
||||||
|
if err != nil {
|
||||||
|
logger.HTTPLogger.Fatalf("Failed to start HTTP server: %v", err)
|
||||||
|
}
|
||||||
logger.HTTPLogger.Printf("HTTP Server running on :%v", port)
|
logger.HTTPLogger.Printf("HTTP Server running on :%v", port)
|
||||||
http.ListenAndServe(fmt.Sprintf(":%d", port), router)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user