Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/634750802/vercel-blob-server
Mocking a vercel blob server ONLY FOR LOCAL DEVELOPMENT.
https://github.com/634750802/vercel-blob-server
nextjs vercel vercel-blob
Last synced: 4 days ago
JSON representation
Mocking a vercel blob server ONLY FOR LOCAL DEVELOPMENT.
- Host: GitHub
- URL: https://github.com/634750802/vercel-blob-server
- Owner: 634750802
- Created: 2024-06-18T05:40:18.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-18T10:19:21.000Z (7 months ago)
- Last Synced: 2024-10-18T16:25:56.241Z (3 months ago)
- Topics: nextjs, vercel, vercel-blob
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vercel blob server
> Mocking a vercel blob server **_ONLY FOR LOCAL DEVELOPMENT_**.
The code is **NOT TESTED**, contributions are welcome.
Supported API:
- `get`
- `head`
- `put`
- `copy`
- `del`## Run with docker compose
Create docker image locally.
```shell
$ pnpm i
$ pnpm run build
$ pnpm run build:docker
```Add container config to your docker compose
- volume: `/var/vercel-blob-store` stores all uploaded file and meta info.
- port: `3000`: container http server port```yaml
vercel-blob-server:
ports:
- '9966:3000'
image: vercel-blob-server
volumes:
- ./dev/vercel-blob-store:/var/vercel-blob-store
```## Usage
Edit your .env.local
```dotenv
# This env cheats @vercel/blob's internal pre checks
BLOB_READ_WRITE_TOKEN=vercel_blob_rw_somefakeid_nonce
# This port should be same to your mapped port
VERCEL_BLOB_API_URL=http://localhost:9966
```Just use `@vercel/blob` as before