Last active
January 7, 2021 19:00
-
-
Save vaskaloidis/590b837a1f0cc9adf0bc20049a0ac1b5 to your computer and use it in GitHub Desktop.
Revisions
-
vaskaloidis renamed this gist
Jan 7, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vaskaloidis renamed this gist
Jan 7, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vaskaloidis created this gist
Jan 4, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ if Rails.const_defined? 'Server' options = { addr: ENV.fetch('PORT') { 3000 } } puts 'Starting Ngrok' Ngrok::Tunnel.start(options) puts '[NGROK] tunneling at ' + Ngrok::Tunnel.ngrok_url_https config.hosts << Ngrok::Tunnel.ngrok_url_https ENV['api_return_url_base'] = Ngrok::Tunnel.ngrok_url_https puts "[Ngrok] ENV VARIABLE api_return_url_base: #{ENV["api_return_url_base"]}" end at_exit do if Rails.const_defined? 'Server' if Ngrok::Tunnel.running? puts 'Stopping Ngrok' Ngrok::Tunnel.stop end end end