fixed a bug & replicated all changes to docker version

This commit is contained in:
2025-12-27 19:23:22 +01:00
parent cc0b0a891e
commit bc74aa8116
25 changed files with 1876 additions and 509 deletions

View File

@@ -77,6 +77,16 @@ async function viewsRoutes(fastify: FastifyInstance) {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', 'books', 'read.html'));
reply.type('text/html').send(stream);
});
fastify.setNotFoundHandler((req, reply) => {
const stream = fs.createReadStream(path.join(__dirname, '..', '..', 'views', '404.html'));
reply
.code(404)
.type('text/html')
.send(stream)
})
}
export default viewsRoutes;