【问题标题】:create(clone) the same app for development in heroku在heroku中创建(克隆)相同的应用程序进行开发
【发布时间】:2020-07-24 00:33:22
【问题描述】:

我在 heroku 中有应用程序 http://example.com。所以我需要在子文件夹http://example.com/subfolder 中为我的开发创建(克隆)相同的应用程序。这个怎么做。任何帮助将不胜感激。

注意: 我只有 heroku 访问权限,没有可用的域登录。

Heroku nodejs 应用程序。

我是 Heroku 的新手。我在localhost:5000 中克隆了相同的应用程序。但需要在线开发环境。

【问题讨论】:

    标签: node.js heroku clone development-environment heroku-cli


    【解决方案1】:

    最后我创建了暂存环境。我的开发环境在本地。

    一旦我将我的生产应用程序克隆到本地,然后我正在创建暂存环境。 参考这个link 从heroku 下载代码。确保您已下载应用程序 slug。

    一旦克隆到我的本地。我检查了localhost:5000。为此,我已经在 Windows 10 中安装了节点服务器和 git。

    heroku create --remote staging

    执行上述命令后,您将看到在您的 Heroku 登录中创建的新暂存环境(名称将自动生成)。

    在 heroku 登录中单击新创建的应用程序名称,然后部署选项卡,按照其中给出的过程进行操作。链接可以是这样的https://dashboard.heroku.com/apps/autogenerated-appname-12345/deploy/heroku-git

    在最后一步 git push heroku master 我得到了错误

     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.
    

    然后我使用了git push staging master,在这个document中提到。

    然后我在浏览器中查看https://autogenerated-appname-12345.herokuapp.com/

    【讨论】:

      猜你喜欢
      • 2016-11-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多