INIT
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// PocketBase client initialization
|
||||
// Update this URL to match your PocketBase instance
|
||||
const POCKETBASE_URL = 'https://pocketbase.ccllc.pro';
|
||||
|
||||
// Initialize PocketBase client
|
||||
const pb = new PocketBase(POCKETBASE_URL);
|
||||
|
||||
// Handle connection errors
|
||||
pb.beforeSend = function (url, options) {
|
||||
console.log('PocketBase request:', url, options);
|
||||
return { url, options };
|
||||
};
|
||||
|
||||
// Handle auth state changes
|
||||
pb.authStore.onChange((token, model) => {
|
||||
console.log('Auth state changed:', token ? 'authenticated' : 'not authenticated');
|
||||
});
|
||||
|
||||
// Export for use in other modules
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = pb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user