Flags for listen and metrics address; fix in newRedirectPasteSuccess.txt.tmpl
Fixes #9
This commit is contained in:
@@ -28,7 +28,7 @@ func recoveryMiddleware(next http.Handler) http.Handler {
|
||||
})
|
||||
}
|
||||
|
||||
func StartMainServer() {
|
||||
func StartMainServer(addr string) {
|
||||
// Initialize Gorilla router
|
||||
router := mux.NewRouter()
|
||||
router.Use(recoveryMiddleware)
|
||||
@@ -42,7 +42,7 @@ func StartMainServer() {
|
||||
|
||||
srv := &http.Server{
|
||||
Handler: router,
|
||||
Addr: "127.0.0.1:8000",
|
||||
Addr: addr,
|
||||
WriteTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user