22

我有一个用 MEAN 构建的很棒的工作网站,并且在本地工作得很好。我希望将它部署在我的服务器上,但除了将文件上传到我的网站 ftp 之外,我从未部署过网站。

教程有人吗?

4

3 回答 3

2

另一个好的起点是 Digital Ocean,他们提供一键式安装 MEAN 堆栈和教程。https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image

于 2015-03-19T16:44:29.663 回答
2

我刚刚部署了我MEAN Stack applicationHeroku cloud application环境。部署步骤很简单。

部署步骤:

  1. 您的平均堆栈项目结构应该是这样This is very important step. The bottonline is your package.json and server.js should be under your root directory. Have a look at the link to know more about the structure.
  2. 在本地克隆您的远程存储库,即git clone https://github.com/heroku/node-js-getting-started.git
  3. 进入克隆的存储库,例如cd node-js-getting-started
  4. git add .
  5. git commit -m "Sample"
  6. 运行Heroku login(它会要求您按任意键然后打开浏览器并要求您单击登录。登录后关闭浏览器实例。
  7. 运行heroku create myApp --buildpack heroku/nodejsNote: Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. 更多信息
  8. 运行git push heroku master。您的部署将开始。
  9. 部署完成后,您将在命令提示符终端上看到完整的部署日志
  10. 应用程序现已部署。确保至少有一个应用程序实例正在运行:heroku ps:scale web=1

  11. 运行heroku open。它将运行您部署的实例。

  12. 运行heroku logs以查看有关正在运行的应用程序的信息。更多信息

您可以访问以下链接找到更多详细信息:

https://devcenter.heroku.com/articles/getting-started-with-nodejs#prepare-the-app https://devcenter.heroku.com/articles/deploying-nodejs

于 2019-01-09T07:41:24.647 回答
1

从这里开始...... https://github.com/linnovate/mean#hosting-mean 你打算在什么操作系统上托管它?

于 2015-03-23T13:16:17.000 回答