logging
This commit is contained in:
3
main.go
3
main.go
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
"github.com/joho/godotenv"
|
||||
"michaelthomson.dev/mthomson/go-todos-app/handlers"
|
||||
"michaelthomson.dev/mthomson/go-todos-app/middleware"
|
||||
"michaelthomson.dev/mthomson/go-todos-app/repositories"
|
||||
"michaelthomson.dev/mthomson/go-todos-app/services"
|
||||
)
|
||||
@@ -130,7 +131,7 @@ func main() {
|
||||
|
||||
server := http.Server{
|
||||
Addr: "localhost:3000",
|
||||
Handler: router,
|
||||
Handler: middleware.LoggingMiddleware(router),
|
||||
}
|
||||
|
||||
log.Fatal(server.ListenAndServe())
|
||||
|
||||
Reference in New Issue
Block a user