Installation
Using npm:
$ npm install local-webhooks --global
You should now have program
lw-client available.
You can also use
npx local-webhooks instead,
which executes lw-client
indirectly.
Configuration
You need to provide some configurations to the
lw-client program.
{
// URL of the lw-server instance.
// Optional. Defaults to `https://lw.gocho.live`.
"remoteUrl": "http://my.domain.com/path",
// 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"
}
]
}
Usage
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.
You are now connected to the Internet.
Here are your webhook URLs:
1. app on localhost ⇒ https://lw.gocho.live/webhook/super_secret
Your local apps are ready for webhook requests.
As long as the client is running, new webhook requests will be
forwarded to your local apps.