heroku-toolbelt

Setting the port for node.js server on Heroku

拈花ヽ惹草 提交于 2019-11-27 06:34:14
问题 I launched a node.js server with the following line to set the port: app.set('port', process.env.PORT || 8080); This means that, it should either read the PORT env variable or default to 8080, as it does when it's run locally. Neither of them is happening on Heroku, and the server always uses the default port 80. Any idea how to change it? heroku config PORT: 8080 回答1: You can't. Heroku sets the PORT variable that you are supposed to bind, and listens on tcp/80. 回答2: You should use the port

Deploying to Heroku using git on bitbucket

一笑奈何 提交于 2019-11-27 05:11:19
问题 I want to host my source on bitbucket using git because I obviously get a free private repo and I want to host my app on heroku using the source code from bitbucket. Can i do it using the github client and heroku toolbelt. Will it work? Github is great but i dont want everyone seeing my code and I dont want to pay for a private repo because its a small project. 回答1: Deploying to Heroku should work regardless of where you host your code as the Heroku CLI adds it's own git remote for the sake

Heroku app crashes after MongoDB updated to 3.0

会有一股神秘感。 提交于 2019-11-27 04:08:13
问题 MongoDB just forced an update on my Heroku server today from 2.6 to 3.0 Now my app crashes shortly after startup with the error: 2015-10-01T10:22:27.405579+00:00 heroku[web.1]: State changed from crashed to starting 2015-10-01T10:22:42.457971+00:00 heroku[web.1]: Starting process with command `node server` 2015-10-01T10:22:46.278159+00:00 app[web.1]: memory, and will not scale past a single process. 2015-10-01T10:22:46.278136+00:00 app[web.1]: Warning: connect.session() MemoryStore is not