1
0
Fork 0
mirror of synced 2024-09-17 18:07:57 +12:00
appwrite/app/sdks/node/docs/examples/database/list-documents.md

19 lines
345 B
Markdown
Raw Normal View History

2019-09-13 04:20:03 +12:00
const sdk = require('node-appwrite');
2019-06-10 06:13:55 +12:00
2019-09-13 04:20:03 +12:00
// Init SDK
let client = new Database.Client();
let database = new sdk.Database(client);
client
2019-10-02 07:10:33 +13:00
.setProject('')
.setKey('')
2019-06-10 06:13:55 +12:00
;
2019-09-13 04:20:03 +12:00
let promise = database.listDocuments('[COLLECTION_ID]');
2019-06-10 06:13:55 +12:00
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});