fast routing library. instead of using express i use plain node.js + 
routing lib -
https://github.com/saambarati/mapleTree



On Tuesday, July 3, 2012 2:49:06 PM UTC-7, Marak Squires wrote:
>
> What is a Maple Tree?
>
> On Tue, Jul 3, 2012 at 2:47 PM, josh <[email protected]> wrote:
>
>> I have a variable in server.js. how to access it from within a function 
>> that is exported from a module? 
>> I use mapletree as my routes library that provide me define function -
>>
>> var usersCollections = {};
>> router.define( '/user', require('./routes/user.js') 
>>
>> //routes/user.js
>>
>> module.exports = user;
>>
>> function user (req, res) {
>>   console.log('collection', usersCollection); // not defined
>>   return res.end();
>> };
>>
>> http://pastebin.com/SLHM85Xt
>>
>> here is the complete project - 
>> https://github.com/oren/Y-U-NO-BIG
>>
>> -- 
>> 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to