26 lines
966 B
TypeScript
26 lines
966 B
TypeScript
import { Client, Databases, Storage, Account } from 'appwrite';
|
|
|
|
const endpoint = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT || 'https://appwrite.almeira.com.co/v1';
|
|
const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID || '69b84df5003bd8957c5c';
|
|
|
|
export const client = new Client();
|
|
client.setEndpoint(endpoint).setProject(projectId);
|
|
|
|
export const databases = new Databases(client);
|
|
export const storage = new Storage(client);
|
|
export const account = new Account(client);
|
|
|
|
// Base de datos y Bucket 100% aislados e independientes
|
|
export const DATABASE_ID = process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID || 'sneakers_multistore_db';
|
|
export const BUCKET_ID = process.env.NEXT_PUBLIC_APPWRITE_MEDIA_BUCKET_ID || 'sneakers_media_bucket';
|
|
|
|
// Colecciones independientes
|
|
export const COLLECTIONS = {
|
|
PRODUCTS: 'products',
|
|
CITIES: 'cities',
|
|
PAYMENT_METHODS: 'payment_methods',
|
|
ORDERS: 'orders',
|
|
SETTINGS: 'settings',
|
|
SUPPLIER_POSTS: 'supplier_posts',
|
|
};
|