How to deploy node that uses Gulp to heroku

I was able to get this to work by adding this into my “package.json” file:

"scripts": {
  "start": "node app",
  "postinstall": "gulp default"
}

The postinstall script is run after the build pack. Check this for more information. The only annoying thing is that all of your dependencies have to live under “dependencies” instead of having separate “devDependencies”

I didn’t need to do anything else with buildpacks or configuration. This seems like the simplest way to do it.

I wrote about the process I used here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)