managarten/apps-archived/uload/apps/web/src/lib/pocketbase-client.ts
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

29 lines
818 B
TypeScript

import PocketBase from 'pocketbase';
import { dev } from '$app/environment';
// Use environment-specific PocketBase URL
const POCKETBASE_URL =
import.meta.env.PUBLIC_POCKETBASE_URL || (dev ? 'http://localhost:8090' : 'https://pb.ulo.ad');
// Create PocketBase instance with Cloudflare-friendly settings
export function createPocketBaseClient() {
const pb = new PocketBase(POCKETBASE_URL);
// Disable auto-cancellation to prevent request issues
pb.autoCancellation(false);
// Add timeout for better error handling
pb.beforeSend = function (url, options) {
options.signal = AbortSignal.timeout(30000); // 30 second timeout
// Add headers for Cloudflare compatibility
options.headers = {
...options.headers,
'X-Requested-With': 'XMLHttpRequest',
};
return { url, options };
};
return pb;
}