Backend
Remove the PocketBase backend, turning the project into a frontend-only static site.
Syntax
$ vela disable backend Options
-y, --yes- Skip the confirmation prompt
What it removes
These are deleted, along with anything you added to them:
data/— the local database, and your fixtures, hooks and seeds indata/fixtures,data/hooksanddata/seedssrc/lib/server/workflows.tsand all ofsrc/lib/workflows/, including workflows you wrote. Workflows run on PocketBase, so they go with it.- Every
server.test.tsundersrc/. Server tests run against the PocketBase test context, so they can’t run without it. - The
openworkflow,openworkflow-pocketbaseandcronerpackages
The database on a deployed server is not touched.
The rest is reverted rather than deleted:
src/hooks.server.tsloses the PocketBase handle and theinithook that starts the workflow worker. Handles other features added, such as i18n, stay. The file is deleted only if nothing is left in it.- The SvelteKit adapter is switched back to
@sveltejs/adapter-staticwith an SPA fallback, and@sveltejs/adapter-staticis installed. - The PocketBase block comes out of
.gitignore. test/setup.tsgoes back to the version without a database, which gives tests onlyrequestandagent.- An older project’s
src/routes/+layout.server.tsthat still reads the app name and URL fromlocals.meta, which only the PocketBase handle set, is switched tosrc/lib/site.ts, created if it’s missing. Seturlthere to where the site is deployed. Newer projects already readsrc/lib/site.ts, so their root layout doesn’t change.
A file Vela can’t revert safely, such as a hooks.server.ts whose init does more than start the worker, is left as it is, and you’re told what to change.
Disable the features that depend on the backend — auth, api and the rest — before running this.
What it leaves
@velastack/pocketbase,pocketbase-sveltekitand@sveltejs/adapter-nodestay inpackage.json. Uninstall them yourself if you want them gone.- The
migrations/directory at the project root POCKETBASE_SUPERUSER_EMAILandPOCKETBASE_SUPERUSER_PASSWORDin.env, which is what letsvela enable backendreuse them rather than ask again