feat: added modules

This commit is contained in:
Marvin Zhang
2024-06-14 15:42:50 +08:00
parent f1833fed21
commit 0b67fd9ece
626 changed files with 60104 additions and 0 deletions

25
core/cmd/server.go Normal file
View File

@@ -0,0 +1,25 @@
package cmd
import (
"github.com/crawlab-team/crawlab/core/apps"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(serverCmd)
}
var serverCmd = &cobra.Command{
Use: "server",
Aliases: []string{"s"},
Short: "Start Crawlab server",
Long: `Start Crawlab node server that can serve as API, task scheduler, task runner, etc.`,
Run: func(cmd *cobra.Command, args []string) {
// app
//svr := apps.GetServer(opts...)
svr := apps.GetServerV2()
// start
apps.Start(svr)
},
}