As this is intended to be a docker entrypoint the preferred way to install is using with a dockerfile.
COPY --from=ghcr.io/quantcdn/entrypoint-node:latest /usr/local/bin/entrypoint-node /usr/local/bin/entrypoint-node
This can be run directly from the docker image:
docker run --rm ghcr.io/quantcdn/entrypoint-node:latest entrypoint-node --version
$ entrypoint-node --help
usage: entrypoint-node [<flags>] [<commands>...]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--dir=DIR Directory to execute node commands in.
--url=URL The backend url (optional).
--retry=10 Times to retry the backend connection.
--delay=5 Delay between backend requests.
--version Show application version.
Args:
[<commands>] Node JS commands to execute.
For example to execute build
and start
after a backend connection has been established.
entrypoint-node --url http://localhost build start
git clone [email protected]:quantcdn/entrypoint-node.git && cd entrypoint-node
go generate ./...
go build -ldflags="-s -w" -o build/entrypoint-node .
go run . -h
go test -v ./... -coverprofile=build/coverage.out
View coverage results:
go tool cover -html=build/coverage.out
cd docs
npm install
npm run dev