From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Patrick J Collins <patrick@collinatorstudios.com>
Subject: Re: using unicorn as a local development server
Date: Thu, 23 Feb 2012 04:30:07 +0000 [thread overview]
Message-ID: <20120223043007.GA20356@dcvr.yhbt.net> (raw)
In-Reply-To: <alpine.OSX.2.00.1202221825220.1173@vincent.local>
"Patrick J. Collins" <patrick@collinatorstudios.com> wrote:
> Hi Unicorn friends,
>
> I wanted to try out Unicorn as my development server and I see that I
> need to perform some configuration to make this work nicely with rails.
> >From what I can tell the only real things I need to do to make unicorn
> similar to the default rails server is to supply a config file with:
>
> listen 3000
> logger Logger.new(STDOUT)
Hi Patrick,
You shouldn't even need the logger directive, it goes to stderr by
default so your console will still show it.
> After creating this file, I was kind of confused as to how to proceed..
> Should I made a bash alias like
>
> alias unicorn="unicorn_rails -c /path/to/unicorn_config.rb"
I generally avoid shell aliases for per-app/project things since I
split my work across different apps + terminals + machines.
If I'm (rarely) developing an app that _requires_ a persistently running
web server, I'd just run in the foreground and Ctrl-C/<uparrow+enter> to
use my shell history.
Normally I just write integration tests (sometimes starting unicorn (or
zbatery) + hitting it with curl, but often just mocking a Rack env).
Unlike most folks that develop apps that run over HTTP, I have a strong
aversion to web browsers. I'd rather pipe curl output to "vim -" if I
have to look at any text output from the application.
You'll probably get different answers from other folks here :)
> and lastly, is there a convention where a configuration file like this
> should go on a unix/OS X system?
Nothing that I know of. It's quite common for Rails apps to have a
config/ directory, so maybe the unicorn config file is suitable there...
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2012-02-23 4:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 2:29 using unicorn as a local development server Patrick J. Collins
2012-02-23 4:30 ` Eric Wong [this message]
2012-02-23 5:01 ` Patrick J. Collins
2012-02-23 5:19 ` Eric Wong
2012-02-23 5:49 ` Alex Sharp
2012-02-24 18:47 ` Patrick J. Collins
2012-02-24 19:26 ` Alex Sharp
-- strict thread matches above, loose matches on Subject: below --
2012-02-24 17:43 Matt Smith
2012-02-24 23:10 ` Eric Wong
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-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120223043007.GA20356@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
--cc=patrick@collinatorstudios.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.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
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).