Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:bug: Serve index.html as fallback to fix #1067

itsmejoeeey12eadccfda0a
diff --git a/server.js b/server.js
index 5c83f81e..3920f748 100644
--- a/server.js
+++ b/server.js
@@ -121,7 +121,9 @@ const app = express()
} catch (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 */
http.createServer(app)