Skip to content

Commit

Permalink
Create an ngrok config file that allows access to the web inspection …
Browse files Browse the repository at this point in the history
…feature. (#685)
  • Loading branch information
jonnywilliamson authored and svpernova09 committed Oct 9, 2017
1 parent b70cf6d commit ddaffea
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/create-ngrok.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

PATH_NGROK="/home/vagrant/.ngrok2"
PATH_CONFIG="${PATH_NGROK}/ngrok.yml"

# Only create a ngrok config file if there isn't one already there.
if [ ! -f $PATH_CONFIG ]
then
mkdir -p $PATH_NGROK && echo "web_addr: $1:4040" > $PATH_CONFIG
fi
8 changes: 8 additions & 0 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def Homestead.configure(config, settings)
80 => 8000,
443 => 44300,
3306 => 33060,
4040 => 4040,
5432 => 54320,
8025 => 8025,
27017 => 27017
Expand Down Expand Up @@ -347,5 +348,12 @@ def Homestead.configure(config, settings)
]
end
end

# Add config file for ngrok
config.vm.provision "shell" do |s|
s.path = scriptDir + "/create-ngrok.sh"
s.args = [settings["ip"]]
s.privileged = false
end
end
end

0 comments on commit ddaffea

Please sign in to comment.