Update: build && server frontend

This commit is contained in:
Yûki VACHOT 2022-01-24 22:17:11 +01:00
parent 0f70917b7b
commit 38098497a5
3 changed files with 16 additions and 2 deletions

13
frontend/server.js Normal file
View file

@ -0,0 +1,13 @@
const path = require('path');
const express = require('express');
const app = express();
const port = process.env.PORT || 4200;
app.use(express.static(__dirname + '/dist/frontend'));
app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+ '/dist/frontend/index.html'));
});
app.listen(port, '0.0.0.0',() => {
console.log (`listening on port ${port}`);
});