We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9cf6b commit ba14ee4Copy full SHA for ba14ee4
server.js
@@ -5,12 +5,11 @@ const path = require('path');
5
const app = express();
6
7
// Serve only the static files form the dist directory
8
-app.use(express.static(__dirname + '/dist/<name-of-app>'));
+app.use(express.static('./dist/angular-app-heroku'));
9
10
-app.get('/*', function(req,res) {
11
-
12
-res.sendFile(path.join(__dirname+'/dist/<name-of-app>/index.html'));
13
-});
+app.get('/*', (req, res) =>
+ res.sendFile('index.html', {root: 'dist/angular-app-heroku/'}),
+);
14
15
// Start the app by listening on the default Heroku port
16
app.listen(process.env.PORT || 8080);
0 commit comments