Feat: styles and session
This commit is contained in:
		
							
								
								
									
										7
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								main.go
									
									
									
									
									
								
							| @@ -1,8 +1,8 @@ | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"golias/handlers" | ||||
| 	"log/slog" | ||||
| 	"net/http" | ||||
| 	"time" | ||||
| ) | ||||
| @@ -22,13 +22,14 @@ func ListenToRequests(port string) error { | ||||
|  | ||||
| 	mux.HandleFunc("GET /ping", handlers.HandlePing) | ||||
| 	mux.HandleFunc("GET /", handlers.HandleHome) | ||||
| 	fmt.Println("Listening", "addr", port) | ||||
| 	mux.HandleFunc("POST /login", handlers.HandleFrontLogin) | ||||
| 	mux.HandleFunc("GET /room/createform", handlers.HandleShowCreateForm) | ||||
| 	slog.Info("Listening", "addr", port) | ||||
| 	return server.ListenAndServe() | ||||
| } | ||||
|  | ||||
| func main() { | ||||
| 	port := ":3000" | ||||
| 	fmt.Printf("Starting server on %s\n", port) | ||||
| 	err := ListenToRequests(port) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder