Better start for Flamego
This commit is contained in:
parent
588fbfacbd
commit
cd7003223a
12
main.go
12
main.go
@ -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))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user