Back
[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
- 0
- Databases
- Web
I am writing a function, and I want to generate an unique ID to create a document, How to import ID from appwrite in Node Server SDK?
TL;DR
Solution:
To generate a unique ID every time you create a document using the Node Server SDK for Appwrite, you can use the `createDocument` function along with the `generateUUID` method provided by the SDK. Here's how you can do it:
1. Import the required modules:
```javascript
const { Client, Database } = require('appwrite');
```
2. Create a new instance of the `Client` and `Database` classes:
```javascript
const client = new Client();
const database = new Database(client);
```
3. Use the `generateUUID` method from the SDK to generate a uniqueHow to get ID from Node server SDK to create unique ID , everytime I create a Document.
Yes, Thanks sir 🙂
[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
Recommended threads
- Using Binary Log with Appwrite
If I can remember correctly appwrite uses mariaDB as the underlying database. If so could I use mariaDB’s binary log to see database operations from appwrite?
- Domain Help
My domain estimately.me is verified in Appwrite DNS but SSL certificate keeps failing with: DNS problem: server failure at resolver looking up A for estimately....
- The deployment is blocked
My domain https://allononeagency.social/