updates to deploy to heroku

This commit is contained in:
Raghu-Ch
2018-09-10 12:01:05 -04:00
parent a8d2d19831
commit 6f4770fb6f
3 changed files with 73 additions and 95 deletions

16
server.js Normal file
View File

@@ -0,0 +1,16 @@
//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(path.join(__dirname + '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);