Serve static content
static-ws
is focused in serve SPA applications (Angular, React) with routing. It's useful when you need to clustering you frontend application
static-ws path/to/dist
By default, the server will start at port 8080
, but you can use the -p
flag and change it accordingly you need.
Download the pre-compiled binaries from the OSS releases page and copy them to the desired location.
You can also use it within a Docker container. To do that, you'll need to execute something like the examples below.
docker run --rm --privileged wesleimp/static-ws /path/to/dist/
If you just want to build from source for whatever reason, follow these steps:
clone
git clone [email protected]:wesleimp/static-ws
cd static-ws
dependencies
go mod tidy # or make deps
build
go build -o bin/static-ws . # or make build
verify it works
./bin/static-ws -h