如何将 Web 应用程序部署到现有域 Meteor javascript

How can I deploy a web application onto an existing domain Meteor javascript

我即将部署我的第一个基于 Meteor JS 构建的面向客户端的应用程序。我的客户有一个网站 - www.samplewebsite.com,我想将我的应用程序的路由添加到该站点,因此它将是 www.samplewebsite.com/admin、www.samplewebsite.com/store,等而不是 www.newapplication.meteor.com。我计划使用 Heroku 来托管应用程序。有人可以指出我在哪里可以找到有关如何执行此操作的更多信息吗?如果问题不清楚,我深表歉意,因为我仍在学习技术语法。

谢谢。

看看MUP。它是一个命令行工具,可以非常轻松地进行部署。

您可以使用来自 https://github.com/jordansissel/heroku-buildpack-meteor

的流星构建包

在本地计算机上的 meteor 应用程序目录中执行此操作:

创建一个git提交

git init
git add .
git commit -m "Initial commit"

创建实例:

heroku create --buildpack https://github.com/jordansissel/heroku-buildpack-meteor.git

配置您的应用程序:

heroku addons:create mongolab:sandbox
heroku config:add MONGO_URL=<insert_value_of_MONGOLAB_URI_here>
heroku config:add ROOT_URL=<insert_url_created_above_here>

然后部署到heroku:

git push heroku

从现在开始,您可以使用此处的指南:https://devcenter.heroku.com/articles/custom-domains 设置您的域以匹配 heroku 实例。

通过这种方式,您现在可以为您的应用使用自己的域。