aboutsummaryrefslogblamecommitdiff
path: root/cmd/app/main.go
blob: b9e467c1eece9947bde19daf49e9066013d4181b (plain) (tree)
1
2
3
4
5
6
7
8
9
10







                                  

                                                 























                                                                           
package main

import (
	"log"
	"os"

	"github.com/urfave/cli/v2"

	"neonxp.ru/go/framework/cmd/app/migrator"
	"neonxp.ru/go/framework/cmd/app/serve"
)

func main() {
	app := &cli.App{
		Name: "app",
		Commands: []*cli.Command{
			{
				Name:   "serve",
				Action: serve.Run,
				Flags: []cli.Flag{
					&cli.StringFlag{
						Name:  "config",
						Value: "./config/dev.yaml",
						Usage: "config",
					},
				},
			},
			migrator.Migrator(),
		},
	}
	if err := app.Run(os.Args); err != nil {
		log.Fatal(err)
	}
}