Logo
Explore Help
Register Sign In
kato/WarpBox
1
0
Fork 0
You've already forked WarpBox
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
6e29f644bac89ae1f806c1a2c6e7d5bf663b440a
WarpBox/lib/server/server.go

14 lines
205 B
Go
Raw Normal View History

feat(cli): add cobra-based CLI to run WarpBox server - Add `cmd/main.go` with a new `warpbox` root command and `run` subcommand - Support `--addr` flag (default `:8080`) and delegate startup to `server.Run` - Initialize Go module and dependencies (cobra, gin) via `go.mod`/`go.sum` to enable building the new CLI entrypointfeat(cli): add cobra-based CLI to run WarpBox server - Add `cmd/main.go` with a new `warpbox` root command and `run` subcommand - Support `--addr` flag (default `:8080`) and delegate startup to `server.Run` - Initialize Go module and dependencies (cobra, gin) via `go.mod`/`go.sum` to enable building the new CLI entrypoint
2026-04-25 17:40:39 +03:00
package server
import "github.com/gin-gonic/gin"
func Run(addr string) error {
router := gin.Default()
router.GET("/", func(ctx *gin.Context) {
ctx.String(200, "ok")
})
return router.Run(addr)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 43ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API