Heroku 上独立机架应用程序的路由?
假设我有一个在 Heroku 上运行的 Rails 应用程序,网址为 www.myapp.com
。我想创建一个单独的 Heroku 应用程序来为我的简单 (Rack-Jekyll) 博客提供服务Rails 应用程序,但我希望可以访问此博客,
www.myapp.com/blog/
考虑到它们都是基于 Rack 的,有没有办法将这两个应用程序合并在一起,但将它们保留为单独的 Heroku 应用程序和单独的 git 存储库?
Lets say I have a Rails app running on Heroku at www.myapp.com
. I would like to create a separate Heroku application to serve a simple (Rack-Jekyll) blog for my Rails app but I would like this blog to be accessible at
www.myapp.com/blog/
Is there a way I merge the two apps together considering that they are both Rack based, but keep them as separate Heroku applications and separate git repositories?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用重定向方法。
You can use redirect method.
不,这是不可能的(目前)。您需要将 /blog 作为 gem 或引擎添加到 mainapp 存储库,然后将组合存储库推送到 heroku。
No, this isn't possible (currently). You'll need to add the /blog as a gem or engine to the mainapp repository, and then push the combined repository to heroku.