REST Service for POPCORN - ILIAS
alex
2025-06-10 fd1a50afe2174f8e5bfbf0703161426e46bc405a
cleanup
1 files modified
15 ■■■■■ changed files
app.js 15 ●●●●● patch | view | raw | blame | history
app.js
@@ -174,7 +174,7 @@
   })
/////// STATIC ////////////////////////////////////////////////////////////////
/////// STATIC / SPA ////////////////////////////////////////////////////////////////
fastify.register(require('@fastify/static'), {
@@ -183,19 +183,6 @@
   // constraints: { host: 'example.com' } // optional: default {}
})
// fastify.get('*', function (req, reply) {
//    console.log("!!!!!!!!! send index")
//    // index.html should never be cached
//    reply.sendFile('dist/index.html', {maxAge: 0, immutable: false})
// })
// const favicon = fs.readFileSync("./favicon-32x32.webp")
// fastify.get("/ui/favicon.webp", async function (req, res) {
//    console.log("<<<<<<<<<<<<<<<<<<<<< favicon", favicon.length)
//    res.type("image/webp").send(favicon)
// })
const indexFile = fs.readFileSync(path.join(__dirname, "vue/dist", 'index.html'), 'utf8')
fastify.setNotFoundHandler(function (req, res) {