ngrok.cr v0.3.1
Ngrok
Crystal wrapper for ngrok. This library does not require ngrok be installed as it includes a downloaded which will go and fetch the version of ngrok for your system and save it locally. If you do have ngrok installed it will use the installed version.
Installation
Add this to your application's shard.yml
:
dependencies:
ngrok:
github: watzon/ngrok.cr
Usage
Authenticate with Ngrok
Ngrok.auth("your token")
Start an Ngrok Session
Ngrok.start(addr: "127.0.0.1:3001",
subdomain: nil,
hostname: nil,
timeout: 10.seconds,
inspect: false,
region: "us",
config: nil,
use_local_executable: true,
ngrok_bin: "./bin") do |ngrok|
# `ngrok.url` contains the http url for this session
puts ngrok.url
# `ngrok.url_https` contains the https url for this session
puts ngrok.url_https
end
Usage Examples
See the examples
directory for a couple usage examples.
Contributing
- Fork it ( https://github.com/watzon/ngrok.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- watzon Chris Watson - creator, maintainer
Repository
ngrok.cr
Owner
Statistic
- 25
- 1
- 0
- 5
- 0
- almost 2 years ago
- February 14, 2018
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 02:17:47 GMT
Languages