2020-04-21 20:51:21 -04:00
|
|
|
//Install express server
|
|
|
|
|
const express = require('express');
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
|
|
const app = express();
|
|
|
|
|
|
|
|
|
|
// Serve only the static files form the dist directory
|
2020-04-21 22:32:37 -04:00
|
|
|
app.use(express.static('./dist/cardWorkout'));
|
2020-04-21 20:51:21 -04:00
|
|
|
|
|
|
|
|
app.get('/*', function(req,res) {
|
2020-04-21 22:23:19 -04:00
|
|
|
res.sendFile(path.join(__dirname,'/dist/cardWorkout/index.html'));
|
2020-04-21 20:51:21 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Start the app by listening on the default Heroku port
|
|
|
|
|
app.listen(process.env.PORT || 8080);
|