fix static bug

This commit is contained in:
FullGreaM 2026-04-26 22:26:02 +03:00
parent eab4dcb37d
commit d1a99d7d04

View File

@ -11,8 +11,6 @@ declare module 'express-serve-static-core' {
}
}
app.use(express.static(path.join(__dirname, 'static')));
// Checking auth
app.use((req, res, next) => {
req.isAuthenticated = true; // Mock authentication, replace with real logic
@ -36,6 +34,8 @@ app.get('/home', (req, res) => {
res.sendFile('index.html', { root: path.join(__dirname, 'static') });
});
app.use(express.static(path.join(__dirname, 'static')));
app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});