Better start for Flamego

This commit is contained in:
Gregory Ballantine 2023-11-24 13:25:24 -05:00
parent 588fbfacbd
commit cd7003223a

12
main.go
View File

@ -1,15 +1,17 @@
package main package main
import ( import (
"github.com/flamego/flamego" "log"
"net/http"
"github.com/flamego/flamego"
) )
func main() { func main() {
f := flamego.Classic() f := flamego.Classic()
f.Get("/", func() string { f.Get("/{*}", printRequestPath)
return "Hello, Flamego!"
})
f.Run() log.Println("Server is running...")
log.Println(http.ListenAndServe("0.0.0.0:2830", f))
} }