A tiny CLI utility for static file serving
Prerequisites:
Install serve from source:
go install github.com/igormichalak/serve/cmd/serve@v1.0.1
If the serve
command can't be found, make sure that the $GOBIN
(or $GOPATH/bin
) directory is added to your system PATH.
Here's how to find the location of the binary:
go env GOBIN
echo "$(go env GOPATH)/bin"
More info: https://go.dev/wiki/GOPATH
serve path/to/directory
Usage of serve:
-expose
expose the server to all interfaces
-port string
HTTP server port (default "8080")
-reload
inject auto reload into HTML files