Closed tanjunior closed 1 year ago
Hello,
I read your article on How to Deploy Your Angular App to Heroku in Minutes and found it to be very informative.
Sadly as I was following the steps I found out that it is quite outdated.
ng build --prod does not work anymore the new command is ng build --configuration production
ng build --prod
ng build --configuration production
and the angular.json file from the latest starter templates was changed as well
angular.json
"builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "www", "index": "src/index.html", "main": "src/main.ts"
Thus, the code for express
app.use(express.static('./dist/angular-heroku')); app.get('/*', (req, res) => res.sendFile('index.html', {root: 'dist/angular-heroku/'}), );
does not work as well.
I tried changing it to
app.use(express.static('./www')); app.get('/*', (req, res) => res.sendFile('index.html', {root: 'www/'}), );
and ran the node server.js with no errors but it seems like it's not listening
node server.js
Hello,
I read your article on How to Deploy Your Angular App to Heroku in Minutes and found it to be very informative.
Sadly as I was following the steps I found out that it is quite outdated.
ng build --prod
does not work anymore the new command isng build --configuration production
and the
angular.json
file from the latest starter templates was changed as wellThus, the code for express
does not work as well.
I tried changing it to
and ran the
node server.js
with no errors but it seems like it's not listening