Meteor.js 部署到“example.com"或“www.example.com"?

编程入门 行业动态 更新时间:2024-10-23 04:54:01
本文介绍了Meteor.js 部署到“example"或“www.example"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近使用以下命令部署了一个流星应用程序:

I recently deployed a meteor app using the following command:

$ meteor deploy example

以及后来(认为是一样的)使用以下内容:

and later (thinking that it was the same) using the following:

$ meteor deploy www.example

它最终会提供两个不同版本的应用,一个托管在example"中,另一个托管在www.example"中.

It end up serving two different versions of the app, one hosted in "example" and other hosted in "www.example".

我可以恢复其中一个部署吗?我应该还原哪个?

Can I revert one of the deploys? Which one should I revert?

如果没有,我应该在我的域名提供商上设置什么样的配置?

If not, what kind of configs should I set on my domain provider?

谢谢,若昂

推荐答案

当人们访问您的页面时,您希望他们看到 mydomain 还是 www.mydomain?

When people go to your page, do you want them to see mydomain or www.mydomain?

如果它是 mydomain,那么您希望使用 A 记录设置您的 DNS 区域文件,该记录指向来源的 IP.流星网

If it's mydomain, then you want to set your DNS zone file with an A record for the domain that points to the IP of origin.meteor

如果它是 www.mydomain,那么您希望使用 CNAME 为指向 origin 的子域www"设置 DNS 区域文件.meteor

If it's www.mydomain, then you want to set your DNS zone file with a CNAME for the subdomain "www" that points to origin.meteor

然后,您想将域转发"从这些选项之一设置为另一个选项.例如,我设置了 playlistparty 转发到 www.playlistparty.

Then, you want to set "domain forwarding" from one of those choices to the other. For example, I've set up playlistparty to forward to www.playlistparty.

在此之后,您只需运行:

After this, you just run:

meteor deploy www.playlistparty

您可以使用 --delete 选项删除不使用的部署.

You can delete the deployment you won't be using with the --delete option.

meteor deploy www.playlistparty --delete

更多推荐

Meteor.js 部署到“example.com"或“www.example.com"?

本文发布于:2023-11-01 11:43:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549251.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:js   Meteor   www   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!