Skip to content

A local-first personal finance app

Fix / route returning the wrong MIME type (#125)

Jed Fox60b183b0946a
diff --git a/app.js b/app.js
index 944d33aa41..d3e8a3f89a 100644
--- a/app.js
+++ b/app.js
@@ -36,8 +36,7 @@ app.use((req, res, next) => {
});
app.use(express.static(config.webRoot, { index: false }));
-let indexHTML = fs.readFileSync(config.webRoot + '/index.html');
-app.get('/*', (req, res) => res.send(indexHTML));
+app.get('/*', (req, res) => res.sendFile(config.webRoot + '/index.html'));
async function run() {
if (!fs.existsSync(config.serverFiles)) {