Deploy two separate heroku apps from same git repo

前端 未结 4 1056
梦谈多话
梦谈多话 2020-12-08 07:59

Within one git repo, I have two separate applications (web server and API server).

How can I deploy each application to its own Heroku app?

(So there

4条回答
  •  自闭症患者
    2020-12-08 08:24

    We can add to the customized script to deploy a particular folder in our git directory to our npm scripts in the package.json file. Check the below code in the package.json file

    "scripts": {
        "start": "node app.js",
        "publishheroku": "cd ../../ && git subtree push --prefix nodeapps/appone heroku-app-one master || true"
      },
    

    then you can run npm run-script publishheroku to deploy.

    Also, go through this link for detailed explanation.

提交回复
热议问题