It's really difficult to explain. But basically, I have an amazon instance, and I want to ssh into it and run a local server on it with sinatra. so I would ssh into the amazon instance, git clone my repo, and run ruby config.ru. Then I want someone else to be able to see that exact local server that is being ran. One of the things I've done is added a security group, port 4567 HTTP so that I can access it via public dns. It works on a rack app but it doesn't work on the sinatra, I've even tried a 'hello world' sample app to try to get it working.
相关问题
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
- JavaScript File Transfer SSH
相关文章
- Ruby using wrong version of openssl
- Check if directory exists on remote machine with s
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
- Git Clone Fails: Server Certificate Verification F
I'm not sure if there is a specific reason that you want to do this from an Amazon server or not, but if you just want someone else to see your sinatra app, you could simply use localtunnel.
Using this, you can simply run localhost on your OWN computer, then run
localtunnel PORTNUMBER
and it will give you a URL that your app will now be visible from. You can then give that URL to anyone you want.Example of use:
$ ruby myapp.rb
$ localtunnel 4567
A URL will then be displayed for you to copy-paste to a friend. Easy as that.
I use this a lot when developing web apps to be mobile friendly and want to quickly look at the app on my phone without having to deploy to a server.