😆 Change order of served up files, fixes everything :)

This commit is contained in:
Alicia Sykes 2022-09-25 19:44:40 +01:00
parent cdf1bb9529
commit c0836acc5e
1 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ const app = express()
// Load SSL redirection middleware
.use(sslServer.middleware)
// Serves up static files
.use(express.static(path.join(__dirname, 'user-data')))
.use(express.static(path.join(__dirname, 'dist')))
.use(express.static(path.join(__dirname, 'user-data')))
.use(express.static(path.join(__dirname, 'public'), { index: 'initialization.html' }))
@ -88,7 +89,7 @@ const app = express()
printWarning(`Error running status check for ${req.url}\n`, e);
}
})
// POST Endpoint used to save config, by writing conf.yml to disk
// POST Endpoint used to save config, by writing config file to disk
.use(ENDPOINTS.save, method('POST', (req, res) => {
try {
saveConfig(req.body, (results) => { res.end(results); });