2017-09-03 71 views
0
2017-09-03T18:50:57.000000+00:00 app[api]: Build started by user 
[me] 
2017-09-03T18:51:28.776809+00:00 heroku[web.1]: State changed from 
crashed to starting 
2017-09-03T18:51:28.572116+00:00 app[api]: Deploy 20b0544e by user 
[me] 
2017-09-03T18:51:28.572116+00:00 app[api]: Release v22 created by 
user [me] 
2017-09-03T18:50:57.000000+00:00 app[api]: Build succeeded 
2017-09-03T18:51:30.798246+00:00 heroku[web.1]: Starting process with 
command `node index.js` 
2017-09-03T18:51:34.045108+00:00 app[web.1]: Sun, 03 Sep 2017 
18:51:34 GMT body-parser deprecated bodyParser: use individual 
json/urlencoded middlewares at index.js:95:9 
2017-09-03T18:51:34.047680+00:00 app[web.1]: Sun, 03 Sep 2017 
18:51:34 GMT body-parser deprecated undefined extended: provide 
extended option at node_modules/body-parser/index.js:105:29 
2017-09-03T18:51:34.050039+00:00 app[web.1]: Sun, 03 Sep 2017 
18:51:34 GMT express-session deprecated undefined resave option; 
provide resave option at index.js:111:9 
2017-09-03T18:51:34.050243+00:00 app[web.1]: memory, and will not 
scale past a single process. 
2017-09-03T18:51:34.142994+00:00 app[web.1]: listening on *:5000 
2017-09-03T18:51:34.050242+00:00 app[web.1]: designed for a 
production environment, as it will leak 
2017-09-03T18:51:34.158304+00:00 app[web.1]: failed to connect to 
server [localhost:27017] on first connect [MongoError: connect 
ECONNREFUSED 127.0.0.1:27017] 
2017-09-03T18:51:34.141487+00:00 app[web.1]: (node:4) 
DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use 
`openUri()` instead, or set the `useMongoClient` option if using 
`connect()` or `createConnection()`. See 
http://mongoosejs.com/docs/connections.html#use-mongo-client 
2017-09-03T18:51:34.050241+00:00 app[web.1]: Warning: 
connect.session() MemoryStore is not 
2017-09-03T18:51:34.050168+00:00 app[web.1]: Sun, 03 Sep 2017 
18:51:34 GMT express-session deprecated undefined saveUninitialized 
option; provide saveUninitialized option at index.js:111:9 
2017-09-03T18:51:34.165093+00:00 app[web.1]: 
Db.prototype.authenticate method will no longer be available in the 
next major release 3.x as MongoDB 3.6 will only allow auth against  
users in the admin db and will no longer allow multiple credentials 
on a socket. Please authenticate using MongoClient.connect with auth 
credentials. 

所以我一直努力到現在很少success.This部署在Heroku我的Node.js應用幾天確實造成了一些挫折,因爲我需要這個程序運行在我的網站上。運行命令Heroku的本地Web呈現應用程序的端口5000在Heroku錯誤運行的Node.js應用

2017-09-03T18:51:34.158304+00:00 app[web.1]: failed to connect to 
server [localhost:27017] on first connect [MongoError: connect 
ECONNREFUSED 127.0.0.1:27017] 

我想這意味着它是我使用MongoDB的數據庫問題的工作版本。當應用程序部署在生產環境中時,我將mLab用作數據庫。我在代碼中添加了mLab所需的連接,但它不起作用。如果有人能幫助我,我真的很感激它嗎?

另外,我是否需要將安裝了npm install的模塊部署到heroku以使應用程序正常工作?我認爲這可能是運行npm install時安裝的軟件包的問題。有人能指出我的問題嗎?

這是一個代碼鏈接,可能會下載這些文件,並在本地測試應用程序並嘗試將它部署到Heroku,如果可能的話。

回答

0

它,因爲你需要更改網址there

PS:不要讓你的數據庫憑據在一個開放的源代碼庫...

+0

我想這樣做,但它沒有工作,仍然得到同樣的錯誤。我也有這個錯誤,也許它響了一個鐘?是的,謝謝你的提問,我只是爲了提出這個問題而在開放空間回購中展示db。我會在刪除它之後。 警告:connect.session()MemoryStore不是 2017-09-03T21:38:51.949247 + 00:00 app [web.1]:專爲生產環境設計,因爲它會泄漏 2017-09-03T21:38 :51.949248 + 00:00應用程序[web.1]:內存,不會通過單個進程進行擴展。 – craynawsum

+0

它爲我工作你有沒有提交你的文件?對於其他問題,它似乎你的樣板是真的老了,並使用許多棄用的東西,有這麼多的熔岩流......我也得到這個錯誤:錯誤R10(引導超時) - > Web進程無法綁定到$ PORT內60秒的發射,你可以在這裏獲得修復(https://stackoverflow.com/questions/15693192/heroku-node-js-error-web-process-failed-to-bind-to-port-within-60-seconds -of) –

+0

我將我的文件提交到heroku https://mysterious-sands-16659.herokuapp.com/ – craynawsum

相關問題