Search code examples
node.jsherokuyeomanheroku-toolbelt

Switch heroku from php to node js


I originally deployed an app using only html / js / css to heroku using this tutorial: http://www.lemiffe.com/how-to-deploy-a-static-page-to-heroku-the-easy-way/ , which requires adding a bit of php.

I have now changed the app to use Yeoman/Angular and had to remove that bit of php. I can't deploy to heroku because it is still trying to find a php app.

I have tried adding the node buildpack but running "heroku buildpack" commands don't seem to be recognized.

the command "heroku version" returns: heroku-gem/3.7.5 (x86_64-darwin13.0.0) ruby/1.9.3

What should I do to switch this app from php to node js?


Solution

  • You might need to upgrade to Heroku Toolbelt (the Heroku gem doesn't seem to have been supported for a while: https://blog.heroku.com/archives/2012/10/15/upgrading-to-the-heroku-toolbelt).

    Then you should be able to set a buildpack manually using

    $ heroku buildpacks:set heroku/nodejs
    

    https://devcenter.heroku.com/articles/buildpacks#setting-a-buildpack-on-an-application