How can I install my dependencies on a deployed Heroku application?

I will try to simplify this problem:

I am deploying an application using Heroku and I would like to automatically install my dependencies on the baur. When testing on localhost, I just ran the "bower install" command in the terminal, but I'm not sure how to translate this to a deployed application.

+3


source to share


1 answer


You need to install Bower as a dependency to your application in package.json.

npm install --save bower

      

Then you will need to add a post install script to package.json with your howitzer dependency outline inside node_modules, it should look like this:



"scripts": {
    "postinstall": "./node_modules/bower/bin/bower install"
}

      

After installing the npm package on Heroku, this script will be executed and your bauer settings will be automatically installed!

I wrote a blog post about this not too long ago, which goes in a little more detail: http://www.catherinebui.com/post/105338527207/deploying-node-js-app-on-heroku-with-bower#105338527207

+4


source







All Articles