-
Notifications
You must be signed in to change notification settings - Fork 0
/
runNgrok.bat
22 lines (21 loc) · 726 Bytes
/
runNgrok.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
:: Run ngrok to expose localhost to the internet
@echo off
set ngrokPath=%~dp0ngrok.exe
set downloadUrl=https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip
set tempZip=%TEMP%\ngrok.zip
if exist "%ngrokPath%" (
echo ngrok.exe found
"%ngrokPath%" http 3000
) else (
echo ngrok.exe not found
echo Downloading ngrok...
powershell -Command "Invoke-WebRequest -Uri '%downloadUrl%' -OutFile '%tempZip%'"
echo Unzipping ngrok...
powershell -Command "Expand-Archive -Path '%tempZip%' -DestinationPath '%~dp0' -Force"
if exist "%ngrokPath%" (
echo ngrok.exe downloaded successfully
"%ngrokPath%" http 3000
) else (
echo Failed to download ngrok.exe
)
)