Installation
Using npm:
$ npm install local-webhooks --global
You should now have program lw-client
available.
Respond to webhook requests from your local machine
{ "foo": "bar" }
$ lw-client
lw.gocho.live
$ lw-server
AcmeCorp server
Sends out requests to configured webhooks
Using npm:
$ npm install local-webhooks --global
You should now have program lw-client
available.
You need to provide some configurations to the lw-client
program.
{
// URL of the lw-server instance.
// Optional. Defaults to `https://lw.gocho.live/ws`.
"remoteUrl": "http://my.domain.com/ws",
// Your local apps, that you may be
// working on or have simply hosted locally.
// This is where you specify where the webhook
// requests will eventually end up.
"localApps": [
{
// Name of the app.
"name": "app on localhost",
// Use a unique secret to identify this app.
// This should be kept safe (but can be seen by
// the server sending the webhook requests).
"secret": "super_secret",
// Where is your local app hosted?
"url": "http://localhost:8081"
}
]
}
In your local machine, start the client.
$ lw-client ./my-config.json
A webhook URL is shown for each local app. You can configure this URL in the server sending the webhook requests.
As long as the client is running, new webhook requests will be forwarded to your local apps.