Skip to content

Ruby Gem Library for interacting with Lokal Client REST API

License

Notifications You must be signed in to change notification settings

lokal-so/lokal-rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lokal Ruby

Ruby Gem for interacting with Lokal Client REST API.

Gem Version

screenshot cli screenshot address bar

Installation

gem 'lokal', '~> 0.0.1'

or install globally

gem install lokal

Example Usage

require 'lokal'
require 'sinatra'

client = Lokal::Client.new
tunnel = client.new_tunnel
           .set_name("Sinatra Backend")
           .set_tunnel_type("HTTP")
           .set_local_address("4567")
           # self-hosted tunnel server with domain k.lokal-so.site must be exist or using Lokal Cloud
           .set_public_address("mybackend551.k.lokal-so.site")
           .set_lan_address("sinatra1.local")
           .ignore_duplicate()
           .show_startup_banner

tunnel.create

configure do
  set :port, 4567
end

get '/' do
  'Hello world!'
end

About

Ruby Gem Library for interacting with Lokal Client REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages