rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Jeremy Hinegardner <jeremy@hinegardner.org>
To: rack-devel@googlegroups.com
Subject: Re: rack 1.2.2 release =>  Rack::Server.new(:app => app).start
Date: Sat, 28 Aug 2010 12:41:38 -0600	[thread overview]
Message-ID: <20100828184138.GD28880@hinegardner.org> (raw)
In-Reply-To: <p06240801c89af1a996fb@[192.168.1.122]>

Hi all,

I too would like to use Rack::Server by passing in an app.
For the moment I'm working around it with:

    server = ::Rack::Server.new( options )
    server.instance_variable_set('@app', options[:app] )
    server.start

enjoy,

-jeremy


On Wed, Aug 25, 2010 at 12:24:44PM -0400, Stephen Bannasch wrote:
> Is a rack 1.2.2 release likely to happen soon?
>
> I'd like to be able to use Rack::Server by passing in an app instead of 
> specifying a config.ru.
>
> I just fixed it by hackingmy rack-1.2.1 gem locally and then saw this 
> commit on July 12:
>
>   
> http://github.com/rack/rack/commit/c73b474525bace3f059a130b15413abd4d917086
>   Rack::Server should accept :app and override :config.
>
> I want to be able to do things like this:
>
>   jnlp_app = Rack::Builder.new do
>     map "/" do
>       use Rack::Jnlp
>       run Rack::Directory.new(PUBLIC_DIR)
>     end
>   end
>
>   Rack::Server.new(:app => jnlp_app, :Port => 4321, :server => 
> 'webrick').start
>
> Which I can now on my machine or if I update to the tip of the master 
> branch.
>
> I'd just like it to be easier to deploy the code on the server or share 
> with other people.
>
> In the meantime I'm using this form:
>
>   Rack::Handler::WEBrick.run(jnlp_app, :Port => 4321)
>
> But starting the server that way doesn't respond to ctrl-c ... see: 
> http://github.com/rack/rack/issues/issue/35
>

-- 
========================================================================
 Jeremy Hinegardner                              jeremy@hinegardner.org 

  reply	other threads:[~2010-08-28 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 16:24 rack 1.2.2 release => Rack::Server.new(:app => app).start Stephen Bannasch
2010-08-28 18:41 ` Jeremy Hinegardner [this message]
2010-09-25 16:45   ` trans
2010-09-26 19:18     ` James Tucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100828184138.GD28880@hinegardner.org \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).