Files
InventoryApp/server.js
2018-09-10 12:01:05 -04:00

17 lines
423 B
JavaScript

//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);