perf: admin

This commit is contained in:
archer
2023-06-14 00:24:50 +08:00
parent 391332c8dd
commit 0a0febd2e6
7 changed files with 199 additions and 66 deletions

View File

@@ -15,6 +15,15 @@ useAppRoute(app);
useKbRoute(app);
useSystemRoute(app);
app.get('/*', (req, res) => {
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
});
app.use((err, req, res, next) => {
res.sendFile(new URL('dist/index.html', import.meta.url).pathname);
});
const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);