package cmd import ( "github.com/urfave/cli" "github.com/go-macaron/gzip" "gopkg.in/macaron.v1" ) var CmdServe = cli.Command{ Name: "serve", Usage: "Start Imagini web server.", Action: serveWeb, } func serveWeb(ctx *cli.Context) error { m := macaron.Classic() m.Get("/", func() string { return "Hello world!" }) m.Use(gzip.Gziper()) m.Run() return nil }