diff --git a/.gitignore b/.gitignore index 221de7e..2b01599 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ node_modules/ /dist-types *.tsbuildinfo dist/ + +# Persisted local dev backend database (better-sqlite3) +/.data/ diff --git a/README.md b/README.md index 614f137..baddf13 100644 --- a/README.md +++ b/README.md @@ -95,3 +95,10 @@ yarn install yarn workspace @rwdocs/backstage-plugin-rw run build yarn workspace @rwdocs/backstage-plugin-rw-backend run build ``` + +Run the dev harness (frontend + backend) with `yarn dev`. + +The backend persists its SQLite database (catalog, search index, …) under a +`.data/` directory at the repo root, so state survives restarts instead of being +rebuilt from scratch each time. The directory is git-ignored. Delete it +(`rm -rf .data`) for a clean database. diff --git a/app-config.yaml b/app-config.yaml index 19ef3f6..ad7e8a5 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -10,7 +10,13 @@ backend: dangerouslyDisableDefaultAuthPolicy: true database: client: better-sqlite3 - connection: ':memory:' + connection: + # Persist the dev DB between runs (catalog, search index, …) instead of + # rebuilding from scratch on every start. Resolved relative to the backend + # process cwd (packages/backend), so ../../ points at the repo root. + # Backstage writes one .sqlite file per plugin in this directory. + # Remove the directory (rm -rf .data) for a clean database. + directory: ../../.data cors: origin: http://localhost:3000 credentials: true