3

I am working on multiple projects at the same time and the node module registry for different projects are not the same.

For example, all modules for project A are from http://registroy.foo.com and modules for project B are all from http://registroy.bar.com

Is there a way we can specify the registry we want to use for the project inside package.json file, something like source defined inside a Gemfile in Ruby.

Patrick Roberts
  • 49,224
  • 10
  • 102
  • 153
XY L
  • 25,431
  • 14
  • 84
  • 143

1 Answers1

11

No, but you can use an .npmrc file in the root directory of your project to specify the registry.

registry=http://registroy.foo.com
Patrick Roberts
  • 49,224
  • 10
  • 102
  • 153