updated routing
This commit is contained in:
parent
faf01f9831
commit
442b10c672
@ -38,6 +38,7 @@ const PORT = 9000;
|
||||
|
||||
app.use(cors())
|
||||
app.use(express.json());
|
||||
app.use(express.static(path.join(__dirname, 'frontend/dist')));
|
||||
|
||||
|
||||
const upload = multer({
|
||||
@ -666,12 +667,8 @@ initDb().then(() => {
|
||||
}
|
||||
});
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'frontend/dist')));
|
||||
|
||||
app.use('/media', express.static(path.join(__dirname, 'media')));
|
||||
app.get('/*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'frontend/dist', 'index.html'));
|
||||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server listening on ${PORT}`);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user