pages-server/main.go

30 lines
510 B
Go
Raw Normal View History

package main
import (
"fmt"
"os"
_ "github.com/joho/godotenv/autoload"
2021-12-03 01:12:51 +00:00
"github.com/urfave/cli/v2"
2021-12-05 13:45:17 +00:00
2021-12-03 01:12:51 +00:00
"codeberg.org/codeberg/pages/cmd"
"codeberg.org/codeberg/pages/server/version"
)
func main() {
2021-12-03 01:12:51 +00:00
app := cli.NewApp()
app.Name = "pages-server"
app.Version = version.Version
2021-12-03 01:12:51 +00:00
app.Usage = "pages server"
app.Action = cmd.Serve
app.Flags = cmd.ServerFlags
2021-12-03 01:12:51 +00:00
app.Commands = []*cli.Command{
cmd.Certs,
2021-11-20 20:10:46 +00:00
}
2021-12-03 01:12:51 +00:00
if err := app.Run(os.Args); err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}