Last Updated: February 25, 2016
· junior-ales

Tired of restarting Sinatra

Sinatra server running and every time you edit some file a server restart is required. Tiring... boring...

In order to avoid that use the gem called shotgun.

You will need to rather than start your app with

$ ruby yourapp.rb

Start with

$ shotgun yourapp.rb

Shotgun will make the app respond on port 9393 as default. If you want the app responding on a different port (e.g. 6379) use

$ shotgun yourapp.rb --port=6379

References <br />