Hi, I am using express and i'm getting an error with the database.createDocument: {"success":false,"message":"database.createDocument is not a function"}
This only shows if i want to import the database from another file, the config file is looking like this now:
import { Client, Databases } from 'node-appwrite';
const client = new Client();
client
.setEndpoint(process.env.APPWRITE_ENDPOINT)
.setProject(process.env.APPWRITE_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
export const database = new Databases(client);
And im importing it like this:
import { database } from '../config/appwrite.js';
and i get the error
The weird thing is the documents are being created, but the error is not dissapearing.
Recommended threads
- Twitter post schema should look like?
If I design a Twitter clone using appwrite, how the twitter post schema should look like? Can't find good repository on GitHub The only tutorial that helped m...
- Firebase Auth and Appwrite as database
Hello everyone, Currently I have developed an application with Firebase as a database. However, because of the Firebase bill, I would like to migrate. I would ...
- 1M+ CSV row data to DB
I have a csv that I intend to add to a collection in my database but that csv has millions of rows. The process of adding each column and its rows under an at...