My Heroku app won't start, when I load the page in the browser it just gives me the generic
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
And my checking my heroku logs pretty much says nothing other than "State changed from starting to crashed
".
2015-04-01T23:10:13.629849+00:00 heroku[api]: Release v12 created by xxxx@gmail.com
2015-04-01T23:10:13.629849+00:00 heroku[api]: Deploy 7d3ab9f by xxxx@gmail.com
2015-04-01T23:10:13.748810+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-01T23:10:15.398769+00:00 heroku[web.1]: Starting process with command `node routes/index.js`
2015-04-01T23:10:17.007727+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-01T23:10:17.007751+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-01T23:10:18.163323+00:00 heroku[web.1]: Process exited with status 0
2015-04-01T23:10:18.184341+00:00 heroku[web.1]: State changed from starting to crashed
When I load the page in the browser and see the error above, the log shows
2015-04-01T23:11:20.387769+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=surrealist-debate.herokuapp.com request_id=2c304a35-950a-422d-9174-4d558cbd4d40 fwd="172.3.184.57" dyno= connect= service= status=503 bytes=
2015-04-01T23:11:20.727572+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=surrealist-debate.herokuapp.com request_id=474f2a28-31eb-4c93-9371-db91ec0f4427 fwd="172.3.184.57" dyno= connect= service= status=503 bytes=
Here is my package.json:
{
"name": "surrealist-debate",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.12.0",
"cookie-parser": "~1.3.4",
"debug": "~2.1.1",
"express": "~4.12.2",
"hjs": "~0.0.6",
"morgan": "~1.5.1",
"serve-favicon": "~2.2.0"
}
}
I also get no clues when running locally through foreman foreman start web
with this Procfile
web: node routes/index.js
foreman just gives me this error:
16:31:34 web.1 | started with pid 12073
16:31:34 web.1 | exited with code 0
16:31:34 system | sending SIGTERM to all processes
I can however run it straight locally with DEBUG: DEBUG=surrealist-debate:* ./bin/www
And it works locally: surrealist-debate:server Listening on port 3000 +0ms
WHAT is going on?! How can I get this to run on Heroku and foreman and not just exit and crash right away with no info?
Aucun commentaire:
Enregistrer un commentaire