I asked here:
Does Node.js require inheritance?
And I was told that I can set variables to the global scope by leaving out the variable.
This does not work for me.
That is, the following does not make the _
available on required files.
_ = require('underscore');
I can set with Express.js's app.set
and have it available elsewhere though.
Is that how this is supposed to work?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…