Back

[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.

  • 0
  • Databases
  • Web
Sandeep K. Dasari
8 Jun, 2023, 19:03

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 unique
Sandeep K. Dasari
8 Jun, 2023, 19:03

How to get ID from Node server SDK to create unique ID , everytime I create a Document.

Sandeep K. Dasari
8 Jun, 2023, 19:10

Yes, Thanks sir 🙂

Sandeep K. Dasari
8 Jun, 2023, 19:10

[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more