modify server.js

This commit is contained in:
Raghu-Ch
2018-09-17 11:17:37 -04:00
parent 36a1961dd6
commit 3dc264ddc1

View File

@@ -1,27 +1,11 @@
//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);
const express = require('express');
const http = require('http');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'dist')));
app.use(express.static(path.join(__dirname, 'dist/ZID')));
app.get('/*', (req, res) => {
res.sendFile(path.join(__dirname, 'dist/ZID/index.html'));