require() a node.js module?
I have a node.js module like this:
开发者_如何学编程# couchdb.js
var couchdb = {
// code
}
module.exports = couchdb;
How do I do to be able to use require("couchdb") in all my files?
Put your module into folder ~/.node_libraries/
to make it available for all scripts
精彩评论