fix static bug
This commit is contained in:
parent
eab4dcb37d
commit
d1a99d7d04
@ -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}`);
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user