-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
Make Google Drive root folder selection configurable via environment variable instead of hardcoding it in code.
Problem
ROOT_FOLDER_ID is currently hardcoded in netlify/functions/api.js.
This makes environment-specific deployments harder and requires code changes + redeploys for folder updates.
Proposed Change
- Read root folder ID from env var:
ROOT_FOLDER_ID
- Keep a backward-compatible fallback to current hardcoded ID (optional, for transition).
- Return a clear startup/runtime error if
ROOT_FOLDER_IDis missing and no fallback is allowed. - Document the variable in:
.env.exampleREADME.md
Acceptance Criteria
- API uses
process.env.ROOT_FOLDER_IDfor/api/folders. .env.exampleincludesROOT_FOLDER_ID=...with description.- README setup section includes this variable.
- App works in local + Netlify when
ROOT_FOLDER_IDis configured. - No behavior regression for existing endpoints (
/api/folders,/api/files/:folderId,/api/search).
Out of Scope
- Changing Drive API query logic beyond root folder source.
- Adding user-level auth or per-user folder routing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels