entrypoint-node

command module
v0.0.0-...-6634689 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 6 Imported by: 0

README

Node entrypoint

GitHub go.mod Go version Go Report Card Coverage Status Release

Installation

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

Usage

$ 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

Local development

Build
git clone git@github.com:quantcdn/entrypoint-node.git && cd entrypoint-node
go generate ./...
go build -ldflags="-s -w" -o build/entrypoint-node .
go run . -h
Run tests
go test -v ./... -coverprofile=build/coverage.out

View coverage results:

go tool cover -html=build/coverage.out
Documentation
cd docs
npm install
npm run dev

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL