How do I use customized node modules?

I've customized an existing node module and would like for my node.js app to use it in production.

Where should I host the forked version of the module?

How do I specify that I would like to use the customized module in my package.json?

My production server needs to be able to access the same version I have modified locally in the node_modules/ directory.

SN: I've tried using Github and pointing to the repo in package.json. I ran into several issues before taking a step back and wondering if I was taking the best approach.

package.json from Github attempt:

 ...

  "dependencies": {
    "express": "3.1.x",
    "crawlme": "git@github.com:DruRly/Crawlme.git"
  },

 ...

Well you can host them @ the npm repository itself. In fact, anyone can and the best thing about it, is that you can just download your own package through npm install <your package name>.

To get started, you need to do this like so:

  1. Go to your package directory, I see you've already made a package.json file there, so thats good, but its a part of the process. Since you've already made it, I won't elaborate
  2. Run this command npm init
  3. Fill out the data it wants. One interesting part is the point of entry parameter, make sure you think about it before you put something down.
  4. After that, make sure that you have a npm username, if not run npm adduser and go through the process
  5. Then you simply npm publish

You should not be able to search for your module using the module you named it. npm has also other functionality, for example when you are making it, you can make a git-hub repo link for where your code is posted.

Now on your host, simply run npm install <your package name> and viola, you can use those packages yourself.