mirror of
https://github.com/Raghu-Ch/InventoryApp.git
synced 2026-02-10 04:43:02 -05:00
18 lines
456 B
JavaScript
18 lines
456 B
JavaScript
//Install express server
|
|
const express = require('express');
|
|
const http = require('http');
|
|
const path = require('path');
|
|
|
|
const app = express();
|
|
|
|
app.use(express.static(path.join(__dirname, 'dist/ZID')));
|
|
|
|
app.get('/*', (req, res) => {
|
|
res.sendFile(path.join(__dirname, 'dist/ZID/index.html'));
|
|
});
|
|
|
|
const port = process.env.PORT || '6797';
|
|
app.set('port', port);
|
|
|
|
const server = http.createServer(app);
|
|
server.listen(port, () => console.log('Running')); |