Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/data-layer/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# Required for reading/writing data to Netlify Blobs when USE_MOCK_DATA=false
# SITE_ID=your-netlify-site-id
# NETLIFY_BLOBS_TOKEN=your-netlify-blobs-token
# BLOB_STORE_NAME=data-layer-dev # Blob store name (default: "data-layer" for prod)

# Google APIs (Calendar events, Apps/Dapps sheet, Community picks)
# GOOGLE_API_KEY=your-google-api-key
Expand Down
1 change: 1 addition & 0 deletions src/data-layer/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Always handle `null` returns with fallback values.
**Production:**
- `SITE_ID` - Netlify site ID (auto-provided)
- `NETLIFY_BLOBS_TOKEN` - Netlify Blobs access token
- `BLOB_STORE_NAME` - Blob store name (default: `data-layer`). Use `data-layer-dev` for dev environments.
- `TRIGGER_PROJECT_ID` - Trigger.dev project ID

**S3 Image Storage:**
Expand Down
4 changes: 3 additions & 1 deletion src/data-layer/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ function getBlobs() {
throw new Error("Missing SITE_ID or NETLIFY_BLOBS_TOKEN")
}

const storeName = process.env.BLOB_STORE_NAME || "data-layer"

blobStore = getStore({
name: "data-layer",
name: storeName,
siteID,
token,
} as Parameters<typeof getStore>[0])
Expand Down