Download src/lib/config.ts from Jessedbrown/daisy-client: direct link, hf CLI and curl.
- Browser
- Download file 704 Bytes
-
https://huggingface.co/Jessedbrown/daisy-client/resolve/main/src/lib/config.ts
- Command line
-
hf download hf://Jessedbrown/daisy-client/src/lib/config.ts
-
curl -L -o config.ts https://huggingface.co/Jessedbrown/daisy-client/resolve/main/src/lib/config.ts
704 Bytes
| // API configuration | |
| export const API_CONFIG = { | |
| BASE_URL: | |
| (import.meta.env.VITE_API_BASE_URL as string) || | |
| 'http://localhost:3000/api/v1', | |
| TIMEOUT: 10000, // 10 seconds | |
| } as const; | |
| // Upload configuration | |
| export const UPLOAD_CONFIG = { | |
| MAX_FILE_SIZE: 25 * 1024 * 1024, // 25MB in bytes | |
| MAX_FILE_SIZE_MB: 25, | |
| ALLOWED_TYPES: ['image/jpeg', 'image/png', 'image/webp', 'image/heic'], | |
| } as const; | |
| // Cache and stale time constants (in milliseconds) | |
| export const CACHE_CONFIG = { | |
| STALE_TIME: 1000 * 60 * 2, // 2 minutes | |
| GC_TIME: 1000 * 60 * 5, // 5 minutes | |
| REFETCH_INTERVAL: 1000 * 30, // 30 seconds | |
| RETRY: { | |
| MAX_QUERY_RETRIES: 3, | |
| MAX_MUTATION_RETRIES: 2, | |
| }, | |
| } as const; | |