Re: Camping.use Before, Rack::File.new('public')

2011-12-17 Thread Magnus Holm
2011/12/16 Bartosz Dziewoński : > I usually just use Rack::Static: > > module App >  use Rack::Static, :urls => ['/static'] > end > > This would serve ./static/jquery.js at > localhost:3301/static/jquery.js, though - with the directory included > in URL - but will also serve files from subdirectori

Re: Camping.use Before, Rack::File.new('public')

2011-12-16 Thread Bartosz Dziewoński
I usually just use Rack::Static: module App use Rack::Static, :urls => ['/static'] end This would serve ./static/jquery.js at localhost:3301/static/jquery.js, though - with the directory included in URL - but will also serve files from subdirectories recursively (I don't know if Rack::File does

Re: Camping.use Before, Rack::File.new('public')

2011-12-16 Thread David Susco
I think that's immensely useful. It'll allow me to keep JS/CSS/HTML separate from the app files but still packaged with the app. Dave On Fri, Dec 16, 2011 at 3:13 PM, Magnus Holm wrote: > Here's one useful snippet: > >  def (Before="").new(a,*o)Rack::Cascade.new(o< > This means that this app: >

Camping.use Before, Rack::File.new('public')

2011-12-16 Thread Magnus Holm
Here's one useful snippet: def (Before="").new(a,*o)Rack::Cascade.new(o