У меня проблемы с выяснением, почему Heroku не может найти мой файл server.js в папке 'app', где он и находится.Я неоднократно выполнял следующие шаги: 1. Удалил существующую папку .git и существующий репозиторий Heroku.Затем я создаю новый репозиторий git, создаю новый репозиторий Heroku и отправляю в Heroku.Вот мои документы:
server.js
const express = require('express');
const app = express();
const path = require('path');
app.use(express.static(__dirname + '/dist'));
app.listen(process.env.PORT || 3000);
/*
PathLocationStrategy - lets Angular handle routing for sub-routes instead of the server.
When we type in some sub-route of our application, index.html will get served
before any other route that might get typed into the address bar. Angular will handle any sub-routes.
*/
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname + '/dist/index.html'));
});
console.log('Console listening on port 3000');
Вот изображение моей файловой структуры, показывающее server.js:
Вот журнал Heroku:
https://gist.github.com/c9991932e7adc3bb6298f1228482fa02.git
Любая помощь будетс благодарностьюЗаранее спасибо.