appwrite / playground-for-web

Simple examples that help you get started with Appwrite + Web (=❤️)
https://appwrite.io
100 stars 72 forks source link

Create Collection and Attributes in Database #90

Open nileshdhakad18 opened 8 months ago

nileshdhakad18 commented 8 months ago

What does this PR do?

This pull request introduces a script to interact with the Appwrite API using Node.js. The script accomplishes the following tasks:

  1. Initializes the Appwrite SDK with project details, including self-signed certificate handling.
  2. Creates a new collection named "tasks" with specified read and write permissions.
  3. Adds a boolean attribute "completed" and a string attribute "text" to the newly created collection.

Test Plan

To verify the changes, follow these steps:

  1. Replace the placeholder values in the config object with actual Appwrite project details.
  2. Run the script using Node.js.
  3. Verify that a new collection named "tasks" has been created with the specified attributes.

Related PRs and Issues

N/A

Have you read the Contributing Guidelines on issues?

Yes.