This commit is contained in:
2021-01-03 10:27:22 -05:00
parent 4389caddcb
commit be28cb3a6c
5 changed files with 47 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
package cmd
import (
"fmt"
"github.com/urfave/cli"
"github.com/go-macaron/gzip"
"gopkg.in/macaron.v1"
)
var CmdServe = cli.Command{
@@ -12,6 +13,11 @@ var CmdServe = cli.Command{
}
func serveWeb(ctx *cli.Context) error {
fmt.Println("hello world")
m := macaron.Classic()
m.Get("/", func() string {
return "Hello world!"
})
m.Use(gzip.Gziper())
m.Run()
return nil
}