Sinatra programatically get port and other information about service

Posted by Poul on Stack Overflow See other posts from Stack Overflow or by Poul
Published on 2010-05-28T16:47:24Z Indexed on 2010/05/28 16:52 UTC
Read the original article Hit count: 153

Filed under:
|
|

I have a sinatra service foo.rb

To run it I on a different port I would type "ruby foo.rb -p 5000".

While the program is running I would like to be able to get the port (in this case 5000) and other information. Is there a way to get info like this while the app is running?

Thanks

© Stack Overflow or respective owner

Related posts about ruby

Related posts about web-services