Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
1/** 2 * Shared constants for wisp.place 3 */ 4 5// Domain configuration 6export const getBaseHost = () => { 7 if (typeof Bun !== 'undefined') { 8 return Bun.env.BASE_DOMAIN || "wisp.place"; 9 } 10 return process.env.BASE_DOMAIN || "wisp.place"; 11}; 12 13export const BASE_HOST = getBaseHost(); 14 15// File size limits 16export const MAX_SITE_SIZE = 300 * 1024 * 1024; // 300MB 17export const MAX_FILE_SIZE = 200 * 1024 * 1024; // 200MB 18export const MAX_FILE_COUNT = 1000; 19 20// Cache configuration 21export const CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes 22 23// Fetch timeouts and limits 24export const FETCH_TIMEOUT_MS = 30000; // 30 seconds 25export const MAX_JSON_SIZE = 10 * 1024 * 1024; // 10MB 26export const MAX_BLOB_SIZE = MAX_FILE_SIZE; // Use file size limit 27 28// Directory limits (AT Protocol lexicon constraints) 29export const MAX_ENTRIES_PER_DIRECTORY = 500; 30 31// Compression settings 32export const GZIP_COMPRESSION_LEVEL = 9;