From 12eadccfda0ae884926c58c9df6cd301db707ad6 Mon Sep 17 00:00:00 2001 From: itsmejoeeey <9375730+itsmejoeeey@users.noreply.github.com> Date: Tue, 17 Jan 2023 01:30:34 +1300 Subject: [PATCH] :bug: Serve index.html as fallback to fix #1067 --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)