From d420aa693773f5793138589745bf02ea4eea3cf7 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 6 Jan 2025 21:34:27 +0700 Subject: all: change the "serve-doc" and default address to prevent conflicts Using port 8080 as the default address for "serve" is too common and may conflict with other services in user local environment. While at it, also change the "serve-doc" with other random ports to allow us test running "ciigo serve" and viewing doc at the same time. --- Makefile | 2 +- cmd/ciigo/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1d2e0ac..3bde4cd 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ build: CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIR_BUILD) ./cmd/... serve-doc: - go run ./cmd/ciigo serve _doc + go run ./cmd/ciigo -address=127.0.0.1:20757 serve _doc .PHONY: chroot-setup chroot-test diff --git a/cmd/ciigo/main.go b/cmd/ciigo/main.go index ceb6389..039ebbb 100644 --- a/cmd/ciigo/main.go +++ b/cmd/ciigo/main.go @@ -37,7 +37,7 @@ func main() { htmlTemplate = flag.String("template", "", "path to HTML template") outputFile = flag.String("out", "ciigo_static.go", "path to output of .go embed file") - address = flag.String("address", `127.0.0.1:8080`, + address = flag.String(`address`, `127.0.0.1:6320`, "the binding address for HTTP server") exclude = flag.String("exclude", "", "a regex to exclude certain paths from being scanned during covert, embeded, watch, or serve") -- cgit v1.3