用heroku的话git push heroku master 被墙了,VPN代理翻墙也不容易push,clound foundry又等不到通知,有没有什么好用还免费的平台啊
29 回复
那个我刚才用mxvpn试了一下,可以push了,但是push总是提示 npm ERR! install Couldn’t read dependencies nom ERR! package.json must be actual JSON, not just Javascript 然后这是我的package.json { "name": "game", "version": "0.0.1", "dependencies": { "express": "3.3.1", "ejs": "", "mongodb": "", "connect-mongo": "", "connect-flash": "" }, "engines": { "node": "0.10.10", "npm": “1.2.25” } } 不知道有什么问题?
@hyxhzz 那就奇怪了,试试这样:
{
"name": "game",
"version": "0.0.1",
"dependencies": {
"express": "3.3.1",
"ejs": "*",
"mongodb": "*",
"connect-mongo": "*",
"connect-flash": "*"
},
"engines": {
"node": "0.10.10",
"npm": "1.2.25"
}
}
@hyxhzz 有没有加Procfile文件,文件内容为:
// Procfile
web: node app.js
app.js就是你的启动文件, app.js中监听的端口:
app.set('port', process.env.PORT || 80);
我的博客一个副本是在appfog 上面(免费) http://a.a.af.cm 另外一个主站博客是在我的vps(centos + mongodb +nodejs) http://www.9958.pw