Deploying Angular app to Heroku, build was successful but in browser it shows 404 not found Deploying Angular app to Heroku, build was successful but in browser it shows 404 not found heroku heroku

Deploying Angular app to Heroku, build was successful but in browser it shows 404 not found


I think the problem is in the server.jstry :

app.use(express.static(${__dirname}/front-end/dist/));

app.get('*', (req, res) => {    res.sendFile(`./front-end/dist/index.html`); // load the single view file (angular will handle the page changes on the front-end)});

where app is const app = express();

obviously change the path to your dist folder.