Skip to content

Foldkit

Source: src/Railway/Website/Foldkit.ts

Deploy a Foldkit app to Railway: a Vite SPA with unmatched paths falling back to index.html so deep links boot the Foldkit router. Same Node static-file Service as Vite.

Foldkit apps are client-only Vite projects — the Foldkit Vite plugin in the app’s vite.config.ts composes with the project’s own Vite build.

During alchemy dev the site is Vite’s own dev server and no cloud resources are created. Alchemy.remote() opts back into the live Service path.

Foldkit app

const site = yield* Railway.Website.Foldkit("Website");

Foldkit project in a subdirectory

const site = yield* Railway.Website.Foldkit("Website", {
rootDir: "applications/web",
});
const site = yield* Railway.Website.Foldkit("Website", {
assets: { notFoundHandling: "404-page" },
});