Pre Raw
This commit is contained in:
10
cmd/cmd.go
10
cmd/cmd.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user