1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-18 21:30:12 +01:00
pingvin-share/.setup/services/aw.service.ts
2022-04-25 17:16:17 +02:00

19 lines
458 B
TypeScript

import sdk from "node-appwrite";
const aw = () => {
let client = new sdk.Client();
client
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"])
.setProject("pingvin-share")
.setKey(process.env["APPWRITE_API_KEY"])
.setSelfSigned();
const database = new sdk.Database(client);
const storage = new sdk.Database(client);
const functions = new sdk.Functions(client);
return { database, storage, functions };
};
export default aw;