Skip to content

Commit

Permalink
cache template html
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 11, 2024
1 parent 0c1e61f commit 0b2cbfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export default class Server {
const compression = (await import("compression")).default
const sirv = (await import("sirv")).default

this.templateHtml = await fs.readFile("./dist/client/index.html", "utf-8")

this.app.use(compression())
this.app.use(this.base, sirv("./dist/client", { extensions: [] }))
} else {
Expand Down

0 comments on commit 0b2cbfc

Please sign in to comment.