1.1.2 • Published 10 years ago

pm2-webhook v1.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

PM2-Webhook

npm npm

PM2 module to process webhooks and update your project realtime. Supports multiple ports and pathes.

Installation

You must have pm2 installed. Just add module

pm2 install pm2-webhook

Usage

GitHub webhook

Your repository page → Settings → Webhooks & services → Add webhook

FieldValue
Payload URLhttp://example.com:23928/webhook
Content Typeapplication/json
SecretSECRET

PM2 config

Add environment variables in your ecosystem.json file. Only port variable is mandatory.

{
    "apps": [
        {
            "name": "app",
            "env_webhook": {
                "port": 23928,
                "path": "/webhook",
                "secret": "SECRET"
            },
            ...
        },
        ...
    ]
}

Restart your processes with pm2 startOrGracefulReload ecosystem.json.

That's it. Each time you push to your repository, this module runs pm2 pull <app name>.

Copyright and license

Copyright 2016 Anton Isaykin.

Licensed under the MIT License.

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago