Skip to content

Commit 55b3940

Browse files
Merge pull request #136 from Nelwhix/fixing-ngrok-listen-command
fix: updating listen command to use new ngrok cli syntax
2 parents e2fde06 + 6a928a3 commit 55b3940

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ The easiest way to set this up while developing your app is with the `php artisa
128128
php artisan lmsqueezy:listen
129129
```
130130

131+
For ngrok, if your app is not running on port `8000` pass in the port you want to tunnel using:
132+
```aiignore
133+
php artisan lmsqueezy:listen ngrok --port=80
134+
```
135+
131136
Although this command should always cleanup the webhook after itself, you may wish to cleanup any lingering webhooks with the `--cleanup` flag:
132137

133138
```bash

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"laravel/framework": "^11.0|^12.0",
4040
"laravel/prompts": "^0.2|^0.3",
4141
"moneyphp/money": "^4.0",
42-
"nesbot/carbon": "^2.0|^3.0"
42+
"nesbot/carbon": "^2.0|^3.0",
43+
"ext-pcntl": "*"
4344
},
4445
"require-dev": {
4546
"laravel/pint": "^1.20",

src/Console/ListenCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class ListenCommand extends Command implements Isolatable, PromptsForMissingInpu
2929
*/
3030
protected $signature = 'lmsqueezy:listen
3131
{service : The service to use for listening to webhooks, either ngrok or expose.}
32+
{--port=8000 : The port on your machine to tunnel to the internet}
3233
{--cleanup : Remove all webhooks for the given service.}';
3334

3435
/**
@@ -254,9 +255,8 @@ protected function ngrok(): int
254255
$this->process([
255256
'ngrok',
256257
'http',
257-
route('lemon-squeezy.webhook'),
258+
$this->option('port'),
258259
'--host-header=rewrite',
259-
'--no-interaction',
260260
]);
261261

262262
while ($this->process->running()) {

0 commit comments

Comments
 (0)