2

I need to install the node.js module sequelize-cli as global to use database migrations on my sequelize ORM schema from the ssh command line. To install the module, can I run an ssh command like:

npm install -g sequelize-cli

How could it be managed when the application scale?

1 Answers1

1

In your package.json like this:

"scripts": {
  "install": "npm install -g sequelize-cli"
}
Vinz243
  • 9,654
  • 10
  • 42
  • 86
  • 1
    From https://www.npmjs.org/doc/misc/npm-scripts.html: Don't use install. Use a .gyp file for compilation, and prepublish for anything else. You should almost never have to explicitly set a preinstall or install script. If you are doing this, please consider if there is another option. Is this case THE exception? – user3542165 Jul 10 '14 at 12:29