Better start for Flamego
This commit is contained in:
parent
588fbfacbd
commit
cd7003223a
10
main.go
10
main.go
@ -1,15 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/flamego/flamego"
|
||||
)
|
||||
|
||||
func main() {
|
||||
f := flamego.Classic()
|
||||
|
||||
f.Get("/", func() string {
|
||||
return "Hello, Flamego!"
|
||||
})
|
||||
f.Get("/{*}", printRequestPath)
|
||||
|
||||
f.Run()
|
||||
log.Println("Server is running...")
|
||||
log.Println(http.ListenAndServe("0.0.0.0:2830", f))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user