- Documentation
Torch Log Service
SDK reference
Node.js SDK
Install TLS SDK for Node.js
Node.js SDK
Install TLS SDK for Node.js
Install TLS SDK for Node.js
Before you use Torch Log Service (TLS) SDK for Node.js to call TLS API actions and implement relevant features, install the SDK. This topic describes how to install TLS SDK for Node.js.
Before you begin
- Create and get a Volcano Engine AccessKey pair.
- The AccessKey pair has the permissions to access all API actions. We recommend that you use an IAM user to call API actions or perform routine O&M. Before you use an IAM user, use a Volcano Engine account to grant the IAM user the permissions to operate TLS resources.
Preparing a development environment
TLS SDK for Node.js is built in the Node.js environment. Before you integrate the SDK, download and install Node.js. For information on the download URL and relevant operations, visit the Node.js official website. Installing the SDK
- Create a project and enter the project directory.
- Run the following command to initialize the SDK, and configure npm initialization as prompted:
- After the initialization, npm automatically creates a configuration file named package.json. The file content is as follows:
- Install the SDK using npm.
tip
If a network error occurs when you use npm, we recommend that you use the specified npm image. - After you run the command, the @volcengine/openapi information is automatically added to the package.json file. File content:
- Build a project using Express.
- This section builds a project using Express as an example. You can use other methods to build a Node.js project as needed.
- Run the following npm command to install Express.
- Run the following npm command to install morgan:
- Create a file named app.js and add the following code:
- Run the following command to start the project:
- The following output is displayed, which indicates that the project is started as expected.
Last updated: 2025.10.11 16:44:07