Adjust routing

This commit is contained in:
Douglas Barone 2023-06-22 10:30:52 -04:00
parent a9bcbd065d
commit 99d945c26a
3 changed files with 13 additions and 1 deletions

View File

@ -12,7 +12,7 @@ import PrinterDiscoveryRouter from './controllers/PrinterDiscoveryController.js'
export const app = express() export const app = express()
app.use('/', express.static('public')) app.use(express.static('public'))
app.use(bodyParser.json()) app.use(bodyParser.json())
app.use(populateUserMiddleware) app.use(populateUserMiddleware)

View File

@ -4,8 +4,14 @@ import { createRouter, createWebHistory } from "vue-router";
const routes = [ const routes = [
{ {
path: "/", path: "/",
name: "Home",
component: () => import(/* webpackChunkName: "home" */ "@/views/Home.vue"), component: () => import(/* webpackChunkName: "home" */ "@/views/Home.vue"),
}, },
{
path: "/:pathMatch(.*)*",
name: "NotFound",
component: () => import(/* webpackChunkName: "home" */ "@/views/404.vue"),
},
]; ];
const router = createRouter({ const router = createRouter({

6
web/src/views/404.vue Normal file
View File

@ -0,0 +1,6 @@
<template>
<div class="page">
<h1>404</h1>
<p>Page not found.</p>
</div>
</template>