How do I upload my Node.js project to Heroku?

0

I have a project that uses Node.js, Websockets, Socket.io and HTML5 running in my internal wireless network. I want to put it public using Heroku.

Please tell me the steps to follow so that I can reach my goal.

    
asked by anonymous 27.05.2014 / 22:26

2 answers

3
  • Open an account at Heroku
  • Is it windows? Install Heroku Toolbelt
  • Log in by typing heroku login into shell
  • Create the project by typing heroku create into the shell
  • If it does not exist, create a Procfile in the project root with the following:

    web: node app.js
    
  • Deploy by typing git push heroku master into the shell

  • Questions? More details? link

        
    27.05.2014 / 22:46
    2

    In addition to what Cigano mentioned, you have to activate the websockets in your application prior to other settings, as it is still experimental in Heroku:

    heroku labs:enable websockets
    

    There's more here:

    link

    Between 4 and 5, if you have not done so, you have to have a git repository in your project, with a remote added:

    git remote add heroku [email protected]:seu-app-name.git
    

    Follow the steps, if you have any more problem or question, point it out to us.

        
    28.05.2014 / 03:38