
`import { Client } from 'node-appwrite';
export default async ({ req, res, log, error }) => { // Initialize Appwrite const client = new Client() .setEndpoint('api.example.com') .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID) .setKey(process.env.APPWRITE_API_KEY);
// Init database const database = new client.Databases(client)`
error: TypeError: client.Databases is not a constructor at Module.default (file:///usr/local/server/src/function/src/main.js:28:20) at execute (/usr/local/server/src/server.js:141:48) at async /usr/local/server/src/server.js:158:13

Function was made with the starter template.

Databases is not a valid constructor functions
Recommended threads
- AppwriteException: Missing required para...
I'm having a problem accessing my users collection to list all my users. I was having trouble creating users but it has been resolved. I'm using react/nodejs on...
- URL attribute in "processing" state
Good day everyone! I just started learning React/Vite. In my current database right now I have these 4 attributes, and the URL attributes seems to still be in ...
- Google sign in wont allow you to choose ...
Hi, this is still unsolved, Appwrite's SDK won't let you specify prompt=select_account param, so a user cannot signin with a desired account, in chrome is just ...
