feat: use notfound.ejs as fallback

This commit is contained in:
Nemo D'ACREMONT 2024-11-17 09:23:10 +01:00
parent c54ad9aefa
commit 083187c15b
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276
2 changed files with 24 additions and 0 deletions

View File

@ -26,4 +26,9 @@ routes.use("/marques", getUsername, verifyAuthentication, marquesRoute);
routes.use("/membres", memberRouter); routes.use("/membres", memberRouter);
routes.use("/models", modelRouter); routes.use("/models", modelRouter);
// 404 fallback
routes.get("*", (_req, res) => {
res.render('notfound.ejs');
});
export default routes; export default routes;

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
404 -- Not Found
</title>
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
<h1>
¯\_(ツ)_/¯
</h1>
</body>
</html>