Skip to main content

Introduction

NPM Version node (scoped)

The Cloudbase Server Node.js SDK enables you to use Node.js services on the server side (such as Tencent Cloud cloud functions or cloud hosts) to access TCB services, including cloud function invocation, file upload and download, and database collection/document operations, facilitating rapid application development.

Starting from v3.0.0, Node.js v12.0 or above is required. If you need a lower version, you can choose v2.0.0.

Note: Starting from v3, if the env parameter is not specified during initialization init({}), the current cloud function environment ID will be used by default instead of the default CloudBase environment. To use the default CloudBase environment, specify init({env: tcb.SYMBOL_DEFAULT_ENV}).

Installation

Cloudbase Server Node.js SDK can be installed via npm:

npm install --save @cloudbase/node-sdk

Usage Example

To use this module in your code:

import tcb from "@cloudbase/node-sdk";

Or

import tcb from "@cloudbase/node-sdk";

Or

import * as tcb from "@cloudbase/node-sdk";