Merge branch 'main' into feat-endpoint-style-structure

This commit is contained in:
Daniel Avila 2023-04-01 19:41:36 -04:00
commit 8fa20d9356
18 changed files with 2281 additions and 24 deletions

View file

@ -23,7 +23,7 @@ const projectPath = path.join(__dirname, '..', '..', 'client');
app.use(errorController);
app.use(cors());
app.use(express.json());
app.use(express.static(path.join(projectPath, 'public')));
app.use(express.static(path.join(projectPath, 'dist')));
app.set('trust proxy', 1); // trust first proxy
app.use(
session({
@ -73,7 +73,7 @@ const projectPath = path.join(__dirname, '..', '..', 'client');
});
app.get('/*', routes.authenticatedOrRedirect, function (req, res) {
res.sendFile(path.join(projectPath, 'public', 'index.html'));
res.sendFile(path.join(projectPath, 'dist', 'index.html'));
});
app.listen(port, host, () => {