mirror of
https://github.com/Lissy93/dashy.git
synced 2024-09-11 14:17:02 +03:00
🐛 Serve index.html as fallback to fix #1067
This commit is contained in:
parent
c957ab6cfe
commit
12eadccfda
@ -121,7 +121,9 @@ const app = express()
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.end(JSON.stringify({ success: false, message: e }));
|
res.end(JSON.stringify({ success: false, message: e }));
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
// GET fallback endpoint
|
||||||
|
.get('*', (req, res) => res.sendFile(path.join(__dirname, 'dist', 'index.html')));
|
||||||
|
|
||||||
/* Create HTTP server from app on port, and print welcome message */
|
/* Create HTTP server from app on port, and print welcome message */
|
||||||
http.createServer(app)
|
http.createServer(app)
|
||||||
|
Loading…
Reference in New Issue
Block a user