I'm using Codio to create a Sinatra app. Obviously, since it's cloud-based, I've added the line set :bind, '0.0.0.0'
to app.rb. I've also set my database.yml file to say host: 0.0.0.0
for both the development and test environments. (I'm using PostgreSQL, and yes I made sure under Tools --> Install Software, that it is running. )
When I run ruby app.rb
in my terminal, Sinatra takes the stage at Port 4567, which I'm able to view perfectly fine.
But when I run rackup
, on the other hand, Sinatra takes the stage at Port 9292. Trying to preview at that port yields a HTTP Error 502 Bad Gateway status.
(Note: I'm unable to post within the Codio Community forums at the moment--their system doesn't seem to realize I'm logged in when I go into their forums page, and it won't let me log in. I'm standing by for help from them on that. Until then, I figured I'd reach out here on StackOverflow.)