Serve front with backend

This commit is contained in:
SebClem 2024-08-13 12:43:15 +02:00
parent 9976219ae7
commit 98e789199e
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
3 changed files with 6 additions and 2 deletions

View File

@ -30,6 +30,9 @@ app.use(cookieParser());
app.use(express.static(path.join(__dirname, "public")));
app.use("/v2/api/", apiV2Router);
app.get("/", (req, res) => {
res.sendFile(path.join(__dirname, "public/index.html"));
});
/*
-----------------------------------------------------------
Error handler

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vuetify 3 Vite Preview</title>
<title>Nextcloud Backup</title>
</head>
<body>

View File

@ -6,7 +6,8 @@
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"lint": "eslint . --fix --ignore-path .gitignore",
"type-check": "vue-tsc --noEmit"
"type-check": "vue-tsc --noEmit",
"build-to-back": "vue-tsc --noEmit && vite build --outDir ../backend/dist/public --emptyOutDir true"
},
"dependencies": {
"@mdi/font": "7.4.47",