summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/router.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/server/router.go b/internal/server/router.go
index 75cf4f9..36c2083 100644
--- a/internal/server/router.go
+++ b/internal/server/router.go
@@ -10,7 +10,7 @@ func (srv *server) ListenToRequests() {
h := srv.actions
mux := http.NewServeMux()
server := &http.Server{
- Addr: "localhost:9000",
+ Addr: fmt.Sprintf("localhost:%d", srv.config.ServerConfig),
Handler: mux,
ReadTimeout: time.Second * 5,
WriteTimeout: time.Second * 5,
@@ -23,6 +23,8 @@ func (srv *server) ListenToRequests() {
mux.HandleFunc("GET /", h.MainPage)
mux.HandleFunc("POST /", h.HandleForm)
mux.HandleFunc("POST /done", h.HandleDoneAction)
+ mux.HandleFunc("POST /login", h.HandleLogin)
+ // mux.HandleFunc("POST /signup", h.HandleLogin)
// ====== elements ======
mux.HandleFunc("GET /showform", h.ServeShowForm)