start

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "start",
	Short: "ecmdb API服务",
	Long:  "启动服务,对外暴露接口",
	RunE: func(cmd *cobra.Command, args []string) error {
		app, err := ioc.InitApp()
		if err != nil {
			panic(err)
		}
		initCronjob(app.Jobs)
		engine.RegisterEvents(app.Event)

		egoApp := ego.New(ego.WithDisableBanner(true))

		if err := egoApp.Serve(
			func() server.Server {
				return app.Web
			}(),
			func() server.Server {
				return app.Server
			}(),
		).Cron().
			Run(); err != nil {
			elog.Panic("startup", elog.FieldErr(err))
		}

		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL