Feat: better logs; login page

This commit is contained in:
Grail Finder
2025-05-02 10:54:51 +03:00
parent 043026de75
commit d18855cd49
6 changed files with 31 additions and 16 deletions

View File

@ -2,16 +2,16 @@ package main
import (
"fmt"
"net/http"
"golias/handlers"
"net/http"
"time"
)
// TODO: add config as param
func ListenToRequests(port string) error{
func ListenToRequests(port string) error {
mux := http.NewServeMux()
server := &http.Server{
Handler: mux,
Handler: handlers.LogRequests(handlers.GetSession(mux)),
Addr: port,
ReadTimeout: time.Second * 5,
WriteTimeout: time.Second * 5,