MCPcopy Create free account
hub / github.com/devfeel/dotweb / main

Function main

example/quickstart/main.go:11–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func 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}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
StartServerMethod · 0.80
GETMethod · 0.65
WriteStringMethod · 0.65

Tested by

no test coverage detected