I'm trying to deploy my app to Heroku and I keep crashing. I use my CLI to open up my app and it still crash and I even deploy the branches on the Keroku dashboard and it still crashes. I was wondering what's wrong with my app.js or packjson
This is the error I get:
2019-06-19T12:32:14.679424+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=guarded-island-18465.herokuapp.com request_id=66a60c63-3bad-47ad-8255-85f56798df95fwd="97.99.40.66" dyno= connect= service= status=503 bytes= protocol=https2019-06-19T12:32:15.283697+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=guarded-island-18465.herokuapp.com request_id=888cb97b-7aaf-4e0b-97c5-d01432d188a6 fwd="97.99.40.66" dyno= connect= service= status=503 bytes= protocol=https
{
"name": "newburger2",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jnperk1234/neweatdaburger.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/jnperk1234/neweatdaburger/issues"
},
"homepage": "https://github.com/jnperk1234/neweatdaburger#readme",
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"express-handlebars": "^3.1.0",
"mongodb": "^3.2.6",
"mysql": "^2.17.1"
}
}
var express = require("express");
var bodyParser = require("body-parser");
var exphbs = require("express-handlebars");
var app = express();
var PORT = process.env.PORT || 3000;
app.use(express.static("public"));
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.engine("handlebars", exphbs({
defaultLayout: "main"
}));
app.set("view engine", "handlebars");
var routes = require("./controllers/burgers_controller.js");
app.use(routes);
app.listen(port, "0.0.0.0", function () {
console.log("Listening on Port 3000");
});