appwrite-utils
Version:
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integrati
15 lines (13 loc) • 315 B
text/typescript
import { Client } from "appwrite";
export const getAppwriteClient = (
endpoint: string,
project: string,
sessionKey?: string
) => {
const client = new Client();
client.setEndpoint(endpoint).setProject(project);
if (sessionKey) {
client.setSession(sessionKey);
}
return client;
};