diff options
author | GrailFinder <wohilas@gmail.com> | 2024-04-20 07:45:00 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2024-04-20 07:45:00 +0300 |
commit | b33be53ea9c0be523988a9412fd8e3f6a24782b3 (patch) | |
tree | 2f05cbfc78613f1771eb8143105859983cb91750 /internal/server | |
parent | ac70f43c3e52e35195353c73af5687b8286ff581 (diff) |
Feat: add auth [wip]
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/router.go | 4 |
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) |