Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildCmd = &cobra.Command{ Use: "build", Short: "Build the application for production", Long: `Build compiles your Velocity application for production deployment. It supports cross-compilation, optimization, and versioning.`, Run: func(cmd *cobra.Command, args []string) { buildApp() }, }
BuildCmd represents the build command
View Source
var MakeControllerCmd = &cobra.Command{ Use: "make:controller [name]", Short: "Generate a new controller", Long: `Generate a new HTTP controller with optional CRUD methods. Examples: velocity make:controller UserController velocity make:controller PostController --resource velocity make:controller API/ProductController --api`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { name := args[0] generateController(name) }, }
MakeControllerCmd represents the make:controller command
View Source
var MigrateCmd = &cobra.Command{ Use: "migrate", Short: "Run database migrations", Long: `Run all pending database migrations for your application.`, Run: func(cmd *cobra.Command, args []string) { runMigrations(false) }, }
MigrateCmd represents the migrate command
View Source
var MigrateFreshCmd = &cobra.Command{ Use: "migrate:fresh", Short: "Drop all tables and re-run migrations", Long: `Drop all database tables and re-run all migrations from scratch.`, Run: func(cmd *cobra.Command, args []string) { runMigrations(true) }, }
MigrateFreshCmd represents the migrate:fresh command
View Source
var ServeCmd = &cobra.Command{ Use: "serve", Short: "Start the development server", Long: `Start the Velocity development server with optional hot reload. The server will automatically reload when Go files change if --watch is enabled.`, Run: func(cmd *cobra.Command, args []string) { ui.Header("serve") if watch { ui.Info(fmt.Sprintf("Starting on port %s with hot reload...", ui.Highlight(port))) } else { ui.Info(fmt.Sprintf("Starting on port %s...", ui.Highlight(port))) } ui.Newline() if watch { runWithWatcher() } else { runServer() } }, }
ServeCmd represents the serve command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.