感谢您的建议,我解决了这个问题,但由于您从未发布过您的package.json
文件,因此我在此处输入它以供更多用户使用,这些用户可能会偶然发现这篇文章并遇到同样的问题:
{
"name": "mean",
"description": "MEAN - A fullStack javascript framework powered by MongoDB, ExpressJS, AngularJS, NodeJS.",
"version": "0.1.2-2",
"private": false,
"repository": {
"type": "git",
"url": "https://github.com/linnovate/mean.git"
},
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
},
"scripts": {
"start": "node server.js",
"test": "node node_modules/grunt-cli/bin/grunt test",
"postinstall": "node node_modules/bower/bin/bower install"
},
"dependencies": {
"express": "~3.4.7",
"bower": "~1.2.8",
"grunt-cli": "~0.1.11",
"connect-mongo": "~0.4.0",
"connect-flash": "~0.1.1",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"mongoose": "~3.8.3",
"passport": "~0.1.18",
"passport-local": "~0.1.6",
"passport-facebook": "~1.0.2",
"passport-twitter": "~1.0.2",
"passport-github": "~0.1.5",
"passport-google-oauth": "~0.1.5",
"passport-linkedin": "~0.1.3",
"lodash": "~2.4.1",
"forever": "~0.10.11",
"view-helpers": "~0.1.4",
"mean-logger": "0.0.1"
},
"devDependencies": {
"grunt-env": "~0.4.1",
"grunt-cli": "~0.1.11",
"grunt-contrib-watch": "latest",
"grunt-contrib-jshint": "latest",
"grunt-karma": "~0.6.2",
"grunt-nodemon": "0.2.0",
"grunt-concurrent": "latest",
"grunt-mocha-test": "latest",
"karma": "~0.10.4",
"karma-coffee-preprocessor": "~0.1.0",
"karma-coverage": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma-requirejs": "~0.2.0",
"karma-phantomjs-launcher": "~0.1.0",
"forever": "~0.10.11",
"supertest": "0.8.2",
"should": "2.1.1"
},
"subdomain": "hitman666-mean2"
}
进行此更改后,我再次部署了我的应用程序,一切都没有错误,但是当我在 Nodejitsu 上浏览它时出现错误:502 Reached max retries limit
.
我意识到我没有正确的 MongoDB 连接字符串,为了更改它,我必须编辑文件夹production.js
中的config/env/
文件。我从 Nodejitsu 的管理仪表板复制了 MongoDB 连接字符串(我在我的博客文章Getting started with Nodejitsu on Windows by deploy a MEN framework中写了如何设置它)。
在此更改之后,我再次部署了我的应用程序,现在一切正常,耶!
PS如果有人感兴趣,关于我是如何做到这一点的整个博客文章在这里:将MEAN.io从Windows机器部署到Nodejitsu