Skip to content

Commit 5a844d7

Browse files
committed
feat: add a README
1 parent ea0b99c commit 5a844d7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# NPM Script Webhook
2+
Tiny web app for executing a npm task after a successful token authentication request.
3+
4+
The request need to be sent via POST in the following format:
5+
```json
6+
{
7+
"secret": "51999777-c86a-41c0-b69f-2e3f9ccc0f3b"
8+
}
9+
```
10+
11+
## Configuration
12+
The following ENV vars are used to configure the app:
13+
- NSW_TOKEN: (required) the token used to authenticate a request
14+
- NSW_WORK_DIR: the working dir with the npm script, defaults to `/var/www/html`
15+
- NSW_SCRIPT_NAME: the name of the task, defaults to `build`
16+
- NSW_TIMEOUT: the maximum time to wait (in ms) for the task to complete, defaults to 30 seconds

0 commit comments

Comments
 (0)