framework

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 13 Imported by: 0

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) {
		fmt.Println()
		fmt.Println(colors.BrandStyle.Bold(true).Render("VELOCITY CLI SERVER"))
		if watch {
			fmt.Printf("Starting on port %s with hot reload...\n", colors.SuccessStyle.Render(port))
		} else {
			fmt.Printf("Starting on port %s...\n", colors.SuccessStyle.Render(port))
		}
		fmt.Println()

		if watch {
			runWithWatcher()
		} else {
			runServer()
		}
	},
}

ServeCmd represents the serve command

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