Sign inSign up

felubra/npm-script-webhook

By felubra

•Updated over 3 years ago

Image
0

486

felubra/npm-script-webhook repository overview

⁠NPM Script Webhook

Tiny web app for executing a npm task after a successful token authentication request.

The request need to be sent via POST in the following format:

{
  "secret": "51999777-c86a-41c0-b69f-2e3f9ccc0f3b"
}

⁠Configuration

The following ENV vars are used to configure the app:

  • NSW_TOKEN: (required) the token used to authenticate a request
  • NSW_WORK_DIR: the working dir with the npm script, defaults to /var/www/html
  • NSW_SCRIPT_NAME: the name of the task, defaults to build
  • NSW_TIMEOUT: the maximum time to wait (in seconds) for the task to complete, defaults to 30 seconds

⁠Responses

The possible responses are:

  • HTTP 204: task execution was successful, the output is logged to stdout.
  • HTTP 403: invalid request or failed token authentication.
  • HTTP 405: only http POST method is allowed.
  • HTTP 500: task execution incurred in errors, traceback is logged to stderr.

Tag summary

Content type

Image

Digest

sha256:55bb47ec2…

Size

26.5 MB

Last updated

over 3 years ago

docker pull felubra/npm-script-webhook