appwrite/docs/examples/1.6.x/server-nodejs/examples/databases/create-float-attribute.md

20 lines
593 B
Markdown
Raw Normal View History

2024-07-03 15:25:40 +00:00
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
2024-07-03 15:25:40 +00:00
const databases = new sdk.Databases(client);
const result = await databases.createFloatAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
null, // min (optional)
null, // max (optional)
null, // default (optional)
false // array (optional)
);