简体   繁体   English

为新的Heroku进程分配子域

[英]Assign subdomain for new heroku process

I'm using node.js & sails. 我正在使用node.js和sails。 So I would like to spawn another heroku process, eg : 'node app2.js" and assign subdomain to it, app2.myherokuname.herokuapp.com 因此,我想生成另一个heroku进程,例如:'node app2.js“并为其分配子域app2.myherokuname.herokuapp.com

Is that possible? 那可能吗? I'm looking for best practices to implement microservice architecture, so I could use common libs, modules, etc. 我正在寻找实现微服务架构的最佳实践,因此我可以使用常见的库,模块等。

This is not possible per-se. 暂时不可能这样做。 You can't create a sub-subdomain to your herokuapp.com subdomain. 您无法创建herokuapp.com子域的子子域。
However, you can create as many apps as you need on your account, and assign them custom domains. 但是,您可以根据需要在帐户中创建任意数量的应用,并为其分配自定义域。

Here your new process would be a new app for which you would assign the custom domain xyexample.com . 在这里,您的新流程将是一个新应用,您将为其分配自定义域xyexample.com Alternatively, if you don't want to use a custom domain, you can just name it app2-myherokuappname.herokuapp.com . 另外,如果您不想使用自定义域,则可以将其命名为app2-myherokuappname.herokuapp.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM