问题描述
我正在尝试部署节点应用程序,但是我的代码结构却遇到了问题.该应用程序是在顶层git初始化的,它看起来像:
I'm trying to deploy a node app, but I'm running into a problem with how my code is structure. The app is git inited at the top level and it looks like:
App (git tracked in remote repo)
- .git
- server
- client
- plugin
- extras
由于Heroku需要我直接使用package.json构建文件直接推送服务器目录,因此我不确定如何设置目录.我希望它可以从"App/server"文件夹中部署heroku,但仍然像现在一样git pull/push整个应用程序:
Since Heroku needs me to push only the server directory directly with the package.json build file, I'm not sure how to setup my directory. I want it such that I can deploy heroku from the 'App/server' folder, but still git pull/push the entire app as I do now:
App (git tracked in remote repo)
- .git
- server (can run 'git push heroku master' for just this folder)
- .git (?)
- client
- plugin
- extras
如何才能最简单地实现这一目标?我阅读了有关git-submodules的信息,但这似乎很混乱,我想确定一下.非常感谢git nub.
How I can achieve this the simplest? I read about git-submodules, but that seems messy and I wanted to be sure. Thank you very much from a git nub.
推荐答案
我认为git-subtree应该起作用:
I think git-subtree should work:
git子树推送-前缀服务器heroku主服务器
其他资源:
这篇关于Heroku部署一个子目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!