appwrite-utils
Version:
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. Version 1.0.0 aligns with the YAML-first architecture of `appwrite-utils-cli`, providing enhanced integration capabilities and rob
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;
};