()
| 9 | ) |
| 10 | |
| 11 | func main() { |
| 12 | // Create a new DotWeb application |
| 13 | app := dotweb.New() |
| 14 | |
| 15 | // Register a simple route |
| 16 | app.HttpServer.GET("/", func(ctx dotweb.Context) error { |
| 17 | return ctx.WriteString("Hello, DotWeb! 🐾") |
| 18 | }) |
| 19 | |
| 20 | // Start the server |
| 21 | fmt.Println("🚀 Server running at http://localhost:8080") |
| 22 | fmt.Println("Press Ctrl+C to stop") |
| 23 | |
| 24 | if err := app.StartServer(8080); err != nil { |
| 25 | fmt.Printf("Server error: %v\n", err) |
| 26 | } |
| 27 | } |
nothing calls this directly
no test coverage detected