ngrok-v1 Gem version

Ruby gem wrapping ngrok v1.

If you're using ngrok v2+, then this gem is not for you; use the ngrok-tunnel gem instead.

Installation

Add this line to your application's Gemfile:

gem 'ngrok-v1'

And then execute:

$ bundle install

Lastly, install the ngrok v1 binary and ensure that it is available in your PATH.

Usage

A basic example:

require 'ngrok-v1'

tunnel = NgrokV1::Client.new(port: 3000, protocol: 'http')

tunnel.start

tunnel.running? # => true

tunnel.uri # => http://75cab18e.ngrok.com

tunnel.stop

tunnel.running? # => false