mirror of
https://github.com/Raghu-Ch/InventoryApp.git
synced 2026-02-10 04:43:02 -05:00
updates to deploy to heroku
This commit is contained in:
16
server.js
Normal file
16
server.js
Normal file
@@ -0,0 +1,16 @@
|
||||
//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);
|
||||
Reference in New Issue
Block a user