added login, first preparation for menu
This commit is contained in:
@@ -3,6 +3,7 @@ import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import chatRouter from './routers/chatRouter.js';
|
||||
import authRouter from './routers/authRouter.js';
|
||||
import navigationRouter from './routers/navigationRouter.js'
|
||||
import cors from 'cors';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -15,10 +16,11 @@ app.use(express.json()); // To handle JSON request bodies
|
||||
|
||||
app.use('/api/chat', chatRouter);
|
||||
app.use('/api/auth', authRouter);
|
||||
app.use('/api/navigation', navigationRouter);
|
||||
app.use('/images', express.static(path.join(__dirname, '../frontend/public/images')));
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../frontend/dist/index.html'));
|
||||
app.use((req, res) => {
|
||||
res.status(404).send('404 Not Found');
|
||||
});
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user