Files
InventoryApp/server.js
2018-09-10 13:44:52 -04:00

16 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(__dirname + '/dist/zid'));
app.get('/*', function (req, res) {
res.sendFile(path.join(__dirname + '/dist/zid/index.html'));
});
// Start the app by listening on the default Heroku port
app.listen(process.env.PORT || 8080);