git-truck 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-truck",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "private": false,
5
5
  "description": "Visualizing a Git repository",
6
6
  "license": "MIT",
package/server.js CHANGED
@@ -3,6 +3,7 @@ import compression from "compression";
3
3
  import morgan from "morgan";
4
4
  import open from "open";
5
5
  import { createRequestHandler } from "@remix-run/express";
6
+ import { resolve } from "path";
6
7
 
7
8
  import * as serverBuild from "@remix-run/dev/server-build";
8
9
 
@@ -16,12 +17,12 @@ app.disable("x-powered-by");
16
17
  // Remix fingerprints its assets so we can cache forever.
17
18
  app.use(
18
19
  "/build",
19
- express.static("public/build", { immutable: true, maxAge: "1y" })
20
+ express.static(resolve(__dirname, "./public/build"), { immutable: true, maxAge: "1y" })
20
21
  );
21
22
 
22
23
  // Everything else (like favicon.ico) is cached for an hour. You may want to be
23
24
  // more aggressive with this caching.
24
- app.use(express.static("public/build", { maxAge: "1h" }));
25
+ app.use(express.static(resolve(__dirname, "./public/build"), { maxAge: "1h" }));
25
26
 
26
27
  app.use(morgan("tiny"));
27
28