Update: build && server frontend
This commit is contained in:
parent
0f70917b7b
commit
38098497a5
3 changed files with 16 additions and 2 deletions
13
frontend/server.js
Normal file
13
frontend/server.js
Normal 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}`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue