main page
This commit is contained in:
25
src/lib/appwrite.js
Normal file
25
src/lib/appwrite.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Client, Account, Databases, Storage, ID, Query } from 'appwrite'
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint(import.meta.env.VITE_APPWRITE_ENDPOINT || 'https://cloud.appwrite.io/v1')
|
||||
.setProject(import.meta.env.VITE_APPWRITE_PROJECT_ID || '')
|
||||
|
||||
export const account = new Account(client)
|
||||
export const databases = new Databases(client)
|
||||
export const storage = new Storage(client)
|
||||
|
||||
export const DATABASE_ID = import.meta.env.VITE_APPWRITE_DATABASE_ID || 'woms-database'
|
||||
|
||||
// Collection IDs
|
||||
export const COLLECTIONS = {
|
||||
WORKORDERS: 'workorders',
|
||||
WORKSHEETS: 'worksheets',
|
||||
CUSTOMERS: 'customers',
|
||||
USERS: 'users',
|
||||
ATTACHMENTS: 'attachments'
|
||||
}
|
||||
|
||||
export const BUCKET_ID = 'woms-attachments'
|
||||
|
||||
// Helper functions
|
||||
export { ID, Query }
|
||||
Reference in New Issue
Block a user