Search code examples
node.jsherokuclonedevelopment-environmentheroku-cli

create(clone) the same app for development in heroku


I am having the app http://example.com in heroku. So I need to create(clone) the same app for my development in subfolder http://example.com/subfolder. How to do this. Any help will be much appreciated.

Note: I am having only heroku access, no domain login available with me.

Heroku nodejs application.

I am new to Heroku. I have clonned the same app in my localhost:5000. But needed online development environment.


Solution

  • Finally I created the staging environment. My development environment is in local.

    Once I clone my production app to my local, then I am creating the staging environment. ref this link for downloading code from heroku. Ensure that you have downloaded the application slugs.

    Once cloned into my local. I checked with localhost:5000. For this I have already installed node server and git in my windows 10.

    heroku create --remote staging

    after the above command, you will see the new staging environment(name will be auto generated) created in your Heroku login.

    Click on that newly created app name in heroku login and then deploy tab, follow the procedure given in that. for which the link can be like this https://dashboard.heroku.com/apps/autogenerated-appname-12345/deploy/heroku-git

    And in the final step git push heroku master I got the error

     fatal: 'heroku' does not appear to be a git repository
    
     fatal: Could not read from remote repository.
    
     Please make sure you have the correct access rights and the repository exists.
    

    Then I used git push staging master which is mentioned in this document.

    Then I checked in the browser https://autogenerated-appname-12345.herokuapp.com/