Skip to content

Executing grunt tasks in your node.js app after deploy

Pascal Friederich edited this page Jan 19, 2016 · 1 revision

Open your package.json and add a postinstall hook to the scriptssection:

{
  "name": "my-platform-app",
  "scripts": {
    "start": "node index.js",
    "postinstall": "grunt my-grunt-task"
  },
  "dependencies": {
    "express": "^4.0.0"
  }
}

A full list of supported hooks can be found here.