updated code structure

This commit is contained in:
marvzhang
2021-04-29 10:44:46 +08:00
parent 820334753a
commit fd0f6fc37a
12 changed files with 192 additions and 80 deletions

View File

@@ -10,12 +10,12 @@ func init() {
}
var apiCmd = &cobra.Command{
Use: "api",
Short: "Start API server",
Long: `Start API server of Crawlab which serves data to frontend`,
Use: "api",
Aliases: []string{"A"},
Short: "Start API server",
Long: `Start API server of Crawlab which serves data to frontend`,
Run: func(cmd *cobra.Command, args []string) {
api := apps.NewApi()
api.Init()
api.Run()
apps.Start(api)
},
}