This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
imagini/cmd/cmd.go
2021-01-03 10:27:22 -05:00

24 lines
413 B
Go

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
}