我有一个用 MEAN 构建的很棒的工作网站,并且在本地工作得很好。我希望将它部署在我的服务器上,但除了将文件上传到我的网站 ftp 之外,我从未部署过网站。
教程有人吗?
我有一个用 MEAN 构建的很棒的工作网站,并且在本地工作得很好。我希望将它部署在我的服务器上,但除了将文件上传到我的网站 ftp 之外,我从未部署过网站。
教程有人吗?
另一个好的起点是 Digital Ocean,他们提供一键式安装 MEAN 堆栈和教程。https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image
我刚刚部署了我MEAN Stack application
的Heroku cloud application
环境。部署步骤很简单。
部署步骤:
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.
git clone https://github.com/heroku/node-js-getting-started.git
cd node-js-getting-started
git add .
git commit -m "Sample"
Heroku login
(它会要求您按任意键然后打开浏览器并要求您单击登录。登录后关闭浏览器实例。heroku create myApp --buildpack heroku/nodejs
。Note: Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno
. 更多信息git push heroku master
。您的部署将开始。应用程序现已部署。确保至少有一个应用程序实例正在运行:heroku ps:scale web=1
运行heroku open
。它将运行您部署的实例。
运行heroku logs
以查看有关正在运行的应用程序的信息。更多信息
您可以访问以下链接找到更多详细信息:
https://devcenter.heroku.com/articles/getting-started-with-nodejs#prepare-the-app https://devcenter.heroku.com/articles/deploying-nodejs
从这里开始...... https://github.com/linnovate/mean#hosting-mean 你打算在什么操作系统上托管它?