Using Thin with a framework other than Rails.
-
macournoyer
- State changed from new to open
- Milestone set to 0.7.0
the problem is that there's no convention as to how to initialize an adapter. Some require that your load the app first (Camping) and some do all the work of loading the app (Rails) and none take the same arguments also.
What I could do though is take a Rack config.ru file as an argument and load that file instead of the adapter like the Rack rackup command does.
What frameowkr did you want to server w/ thin script?
-
Alex MacCaw
I wanted to use my own custom framework. I ended up duplicating bin/thin and replacing that line. I think the option to load a rack config file would be a good idea, defaulting back to Rails if it can't be found.
-
macournoyer
- State changed from open to resolved
- Milestone changed from 0.7.0 to 0.6.3
it's on git now:
Add the --rackup option to load a Rack config file instead of the Rails adapter.
So you can use any framework with the thin script and start cluster and stuff like that.
A Rack config file is one that is usable through the rackup command and looks like this:
use Rack::CommonLogger run MyCrazyRackAdapter.new(:uterly, 'cool')Then use it with thin like this:
thin start --rackup config.ruThx a lot for the suggestion Alex!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.