Skip to content

dist/ is never served, so the editor bundle 404s when self-hosted #73

Description

@rclod

The share page is read from dist/index.html (server/share-web-routes.ts, distPath) and references /assets/editor.js plus the favicons. But server/index.ts only ever serves public/:

app.use(express.static(path.join(__dirname, "..", "public")));

editor.js exists only in dist/assets/, so on a self-hosted deployment:

GET /assets/editor.js -> 404

The page returns 200 with the correct <title>, and the editor renders an empty shell. npm run dev hides this because Vite serves the bundle itself, so it only shows up after npm run build + npm run serve.

Adding the mount fixes it:

app.use(express.static(path.join(__dirname, "..", "dist"), { index: false }));

index: false matters — without it the middleware answers / with dist/index.html and shadows the Proof SDK landing page defined below it.

Happy to send a PR if useful; it is a one-line change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions