Search code examples
node.jsherokuheroku-toolbeltnode.js-connectnode.js-stream

How to deploy a node.js app to heroku?? It is possible or not?


The problem was with git add.I had forgotten to add the node_modules files.I closed the terminal and ran the set of commands given in the Getting started with Heroku and NodeJs[1] again.The application was successfully pushed onto the stack.


Solution

  • Heroku will automatically detect a nodejs application if you include a package.json file in the root of your project. Ensure that package.json is added to your git project before pushing your project to Heroku.

    Your nodejs application should be managed with NPM. For a complete working example see the Nodejs guide on Heroku:

    https://devcenter.heroku.com/articles/nodejs