π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:sparkles: Implements router history mode, for cleaner URLs
Alicia Sykesfffa2319c1b8
diff --git a/server.js b/server.jsindex f19704bf..a07a7e99 100644--- a/server.js+++ b/server.js@@ -12,6 +12,7 @@ const util = require('util');const dns = require('dns');const os = require('os');const bodyParser = require('body-parser');+const history = require('connect-history-api-fallback');/* Kick of some basic checks */require('./services/update-checker'); // Checks if there are any updates available, prints message@@ -56,6 +57,7 @@ const method = (m, mw) => (req, res, next) => (req.method === m ? mw(req, res, ntry {connect()+ .use(history()).use(bodyParser.json())// Serves up the main built application to the root.use(serveStatic(`${__dirname}/dist`))diff --git a/src/router.js b/src/router.jsindex d0cf8f9e..f1983a89 100644--- a/src/router.js+++ b/src/router.js@@ -65,8 +65,12 @@ const makeMetaTags = (defaultTitle) => ({metaTags: metaTagData,});+/* Routing mode, can be either 'hash', 'history' or 'abstract' */+const mode = 'history';+/* List of all routes, props, components and metadata */const router = new Router({+ mode,routes: [{ // The default view can be customized by the userpath: '/',