@ant-basement/node-sdk
TypeScript icon, indicating that this package has built-in type declarations

2.2.3 • Public • Published

node-sdk

Basement SDK for Node.js

Getting Started

tnpm install --save @ant-basement/node-sdk

Usage

// app.js
const Basement = require('@ant-basement/node-sdk');
app.basement = new Basement({
  spaceId: '148086d2-6881-434d-849b-e22bc687a0c2',
  endpoint: '47.100.226.126',
  serverSecret: 'KZMLzTM1q1WyOWVX+nlscgbhgL7B1RQFxrMolIY1U6Yq5rS79aNyDEnAUIhI/v8Q',
  logger: console,
});

// controller/home.js
exports.index = async () => {
  const collectionNames = await app.basement.db.collections();
  const newFile = await app.basement.file.uploadFile();
  const newFileWithUser = await app.basement.setUserId('user_id1234').file.uploadFile();
};

Readme

Keywords

none

Package Sidebar

Install

npm i @ant-basement/node-sdk

Weekly Downloads

1

Version

2.2.3

License

MIT

Unpacked Size

5.17 kB

Total Files

7

Last publish

Collaborators

  • lulin
  • sanglv
  • shouna.ysn
  • zack-lin