README 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Shotgun
  2. This is an automatic reloading version of the rackup command that's shipped with
  3. Rack. It can be used as an alternative to the complex reloading logic provided
  4. by web frameworks or in environments that don't support application reloading.
  5. The shotgun command starts one of Rack's supported servers (e.g., mongrel, thin,
  6. webrick) and listens for requests but does not load any part of the actual
  7. application. Each time a request is received, it forks, loads the application in
  8. the child process, processes the request, and exits the child process. The
  9. result is clean, application-wide reloading of all source files and templates on
  10. each request.
  11. Usage
  12. -----
  13. Installation:
  14. gem install shotgun
  15. Starting a server with a rackup file:
  16. shotgun config.ru
  17. Using Thin and starting on port 6000 instead of 9393 (default):
  18. shotgun --server=thin --port=6000 config.ru
  19. Running Sinatra apps:
  20. shotgun hello.rb
  21. See 'shotgun --help' for more advanced usage.
  22. Links
  23. -----
  24. Shotgun: http://github.com/rtomayko/shotgun
  25. Rack: http://rack.rubyforge.org/
  26. Sinatra: http://www.sinatrarb.com/
  27. The reloading system in Ian Bicking's webware framework served as inspiration
  28. for the approach taken in Shotgun. Ian lays down the pros and cons of this
  29. approach in the following article:
  30. http://ianbicking.org/docs/Webware_reload.html