I'm trying to run a node.js app on heroku, it runs fine using npm start and using heroku locally, but does not run when hosted on heroku. I have looked through all the solutions i could find, the remote mongodb database works fine when run using npm start, my port is set up correctly, have restarted heroku and dynamos a bunch of times, and I have a procfile with the following:
web node index.js
The following is the console messages I get:
Starting process with command `node index.js`
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
Application ready to serve requests.
Environment: production
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
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.
DB Connection Open...
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within
60 seconds of launch
Stopping process with SIGKILL
Process exited with status 137
This is my package.json:
{
"name": "shop",
"version": "0.1.0",
"description": "eCommerce Site",
"author": "Slav Bugryn",
"main": "index.js",
"scripts": {
"test": "grunt test",
"build": "grunt build",
"all": "npm run build && npm run test",
"start": "node server.js"
},
"dependencies": {
"connect-flash": "^0.1.1",
"construx": "^1.0.0",
"construx-copier": "^1.0.0",
"construx-dustjs": "^1.1.0",
"construx-less": "^1.0.0",
"dust-makara-helpers": "^4.2.0",
"dustjs-helpers": "^1.7.3",
"eslint": "^4.12.1",
"express": "^4.12.2",
"express-messages": "^1.0.1",
"kraken-js": "^2.0.0",
"makara": "^2.0.3",
"mongodb": "^2.2.33",
"mongoose": "^4.13.6",
"requirejs": "^2.3.5"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-config-dir": "^0.3.2",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-less": "^1.4.1",
"grunt-contrib-requirejs": "^1.0.0",
"grunt-copy-to": "0.0.12",
"grunt-dustjs": "^1.4.0",
"grunt-eslint": "^20.1.0",
"grunt-makara-amdify": "^1.0.1",
"grunt-mocha-cli": "^3.0.0",
"mocha": "^4.0.1",
"supertest": "^3.0.0"
},
"directories": {
"lib": "lib",
"test": "test"
},
"keywords": [],
"license": "ISC"
}
Any advice would be greatly appreciated, thanks in advance.