2

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?

1 Answer 1

2

Put your module into folder ~/.node_libraries/ to make it available for all scripts

Sign up to request clarification or add additional context in comments.

1 Comment

This one works, but I made it to a NPM package instead and used "npm link/install".

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.