I have written an app in ruby using sinatra. the app works fine and I am testing the post/get request using postman.
Right now I start the app using the command rackup
but it starts the server locally on the port 9292
. using postman, I send the POST
on localhost:9292
I would like to test the app when access from another computer. I expect something using POSTMAN sending a POST on http://182.12.34.1:9292
but I didn't find how to do this.
config.ru
load './app/init.rb'
run Sinatra::Application
Procfile
web: bundle exec unicorn -p $PORT -E $RACK_ENV -c ./config/unicorn.rb
Any idea, how to switch from local test to a server ?
Thansks
Did you perhaps listen to localhost only in the config?
You need to bind the host to
0.0.0.0
otherwise it will only only be available locally...