我正在尝试使用相同的代码和相同的git存储库创建2个不同的Heroku应用程序.App1是由我的朋友在Heroku中创建的,我不是协作者,app2是我正在尝试部署的同一个git存储库的分支.这可能吗?
当我尝试将第二个应用程序部署到Heroku时,我收到错误:
$ git push heroku branch1:master
! my_email_id@gmail.com not authorized to access app1
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud) 我有:
是否可以在同一个 Heroku 域上设置这 2 个存储库的部署 - 所以我会有以下结构?
我有一个nodejs API作为服务器,而React / Redux应用程序作为客户端位于一个git项目中:https : //github.com/lafisrap/fcc_nightlife.git
我想使用heroku cli在Heroku上部署它。
package.json中的脚本部分为:
"scripts": {
"start-dev": "concurrently \"yarn run server\" \"yarn run client\"",
"start": "yarn run server | yarn run client",
"server": "babel-node server.js",
"client": "node start-client.js",
"lint": "eslint ."
},
Run Code Online (Sandbox Code Playgroud)
start-client.js:
const args = [ 'start' ];
const opts = { stdio: 'inherit', cwd: 'client', shell: true };
require('child_process').spawn('yarn', args, opts);
Run Code Online (Sandbox Code Playgroud)
在客户端文件夹中,我还有另一个package.json,它定义了客户端。它的脚本部分:
"scripts": {
"start": "react-scripts start",
}
Run Code Online (Sandbox Code Playgroud)
我做了:
heroku创建
git push heroku master
api运行正常。但是我不知道如何启动/访问客户端。