1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00
appwrite/docs/examples/0.10.x/console-web/examples/database/create-string-attribute.md
Eldad Fux d7eabe3347 init
2021-08-10 21:03:32 +03:00

375 B

let sdk = new Appwrite();

sdk .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ;

let promise = sdk.database.createStringAttribute('[COLLECTION_ID]', '', null, false);

promise.then(function (response) { console.log(response); // Success }, function (error) { console.log(error); // Failure });