load and display document

This commit is contained in:
MapleLeaf
2022-01-02 21:56:28 -06:00
committed by Darius
parent c4e72a1fcf
commit 381f933fd1
7 changed files with 53 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
import compression from "compression"
import express from "express"
import { dirname, join } from "node:path"
import { fileURLToPath } from "node:url"
@@ -8,6 +9,8 @@ const root = dirname(fileURLToPath(import.meta.url))
const app = express()
app.use(compression())
let viteDevServer
if (isProduction) {
app.use(express.static(join(root, "dist/client")))