Q:

Application error in Angular 6 app deployed to heroku

I am trying to deploy an angular 6 app to heroku first time. I don't have idea what is going wrong. 
I have created an angular app which is working fine on localhost but when i deploy to heroku it gives "Application Error" 
Application url: https://todo-app-joharzmn.herokuapp.com/
Here is my server.js file: 
//Install express server
const express = require('express');
const path = require('path');

const app = express();

// Serve only the static files form the dist directory
app.use(express.static('./dist'));

app.get('/*', function(req,res) {
  res.sendFile(path.join(__dirname,'/dist/index.html'));
});

// Start the app by listening on the default Heroku port
app.listen(process.env.PORT || 8080);

my package.json file: 
    {
  "name": "todo-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "node server.js",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e", 
    "preinstall": "npm install -g @angular/cli @angular/compiler-cli typescript",
    "postinstall": "ng build --aot --prod"
  },
  "private": true,
  "dependencies": {
    "@angular/cli": "^6.2.3",
    "@angular/compiler-cli": "^6.1.8",
    "@angular/animations": "^6.1.8",
    "@angular/cdk": "^6.4.7",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/material": "^6.4.7",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "core-js": "^2.5.4",
    "rxjs": "~6.2.0",
    "zone.js": "~0.8.26", "typescript": "~2.9.2"

  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.8.0",
    "@angular/cli": "^6.2.3",
    "@angular/compiler-cli": "^6.1.8",
    "@angular/language-service": "^6.1.0",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.3.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~2.9.2"
  },
  "engines": { 
    "node": "8.12.0", 
    "npm": "6.4.1" 
  }
}

application logs: 
2018-09-22T11:00:07.817882+00:00 app[web.1]: npm ERR! todo-app@0.0.0 start: `node server.js`
2018-09-22T11:00:07.818117+00:00 app[web.1]: npm ERR! Exit status 1
2018-09-22T11:00:07.819425+00:00 app[web.1]: npm ERR! 
2018-09-22T11:00:07.819681+00:00 app[web.1]: npm ERR! Failed at the todo-app@0.0.0 start script.
2018-09-22T11:00:07.819946+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-09-22T11:00:07.950231+00:00 app[web.1]: 
2018-09-22T11:00:07.961935+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-09-22T11:00:07.961944+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-09-22T11_00_07_822Z-debug.log
2018-09-22T11:00:09.438019+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=todo-app-joharzmn.herokuapp.com request_id=b0b530b0-c277-47d5-8e68-cd0a7b68df38 fwd="39.46.157.45" dyno= connect= service= status=503 bytes= protocol=https
2018-09-22T11:00:11.253970+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=todo-app-joharzmn.herokuapp.com request_id=c597732a-5be7-41f0-bf5b-24f5012de2a1 fwd="39.46.157.45" dyno= connect= service= status=503 bytes= protocol=https

Note: App was built successfully. There was not error. 
Update:
Solved by adding express in package.json file under dependencies.
    "express": "^4.16.3"

A:

The problem was with express.
Solved by adding express in package.json file under dependencies. 
"express": "^4.16.3"

