diff options
Diffstat (limited to 'production/app/main.js')
-rw-r--r-- | production/app/main.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/production/app/main.js b/production/app/main.js new file mode 100644 index 00000000..336f21fe --- /dev/null +++ b/production/app/main.js @@ -0,0 +1,18 @@ +const express = require('express'); +const cors = require('cors'); +const path = require('path'); + +const app = express(); + +const port = 8080; + +app.use(cors()); +app.use(express.static(path.join(__dirname, './dist'))); + +app.get(['/', '', '*'], (req, res) => { + res.sendFile(path.join(__dirname, './dist/index.html')); +}); + +app.listen(port, () => { + console.log(`Listening on port ${port}`); +});
\ No newline at end of file |