Lol!  At least I used curly braces for the middleware.

On Mon, Feb 6, 2012 at 1:59 PM, Christopher Jeffrey
<chjjeff...@gmail.com> wrote:
>>     local handler = Stack(
>
> Too much Lua in your blood!
>
> On Feb 6, 1:10 pm, Tim Caswell <t...@creationix.com> wrote:
>> I should mention that you can use the same request handler for several
>> http servers.  For example.
>>
>>      var Http = require('http');
>>     var Stack = require('stack');
>>     var Creationix = require('creationix');
>>
>>     local handler = Stack(
>>       Creationix.log(),
>>       Creationix.static("/", __dirname, "index.html),
>>       function (req, res, next) {
>>         // custom middleware
>>         // ...
>>       }
>>     );
>>
>>     Http.createServer(handler).listen(80, "65.34.23.44");
>>     Http.createServer(handler).listen(80, "65.34.23.45");
>>     // ...
>>
>> I just use "stack" and "creationix" here because they don't integrate
>> tightly with the http.Server instance like Connect and Express do, but
>> I'm sure the same thing can be done there too.
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Feb 6, 2012 at 1:04 PM, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
>> > On Mon, Feb 6, 2012 at 19:15, AJ ONeal <coola...@gmail.com> wrote:
>> >> Can someone suggest a strategy for determining which IP address a request
>> >> came through?
>>
>> >> I'm not looking for the IP address of the remote.
>>
>> >> I want the IP address of the server.
>>
>> > You mean the address the connection came in on a server with multiple 
>> > addresses?
>>
>> > You can't. It's not a Node limitation, most (all?) operating systems
>> > don't provide that information. Bind to each address separately.
>>
>> > --
>> > Job Board:http://jobs.nodejs.org/
>> > Posting 
>> > guidelines:https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> > You received this message because you are subscribed to the Google
>> > Groups "nodejs" group.
>> > To post to this group, send email to nodejs@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > nodejs+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to