Help Center> Content Moderation> SDK Reference> Using Node.js SDK> Importing a Node.js SDK into a Node.js Environment

Importing a Node.js SDK into a Node.js Environment

  1. On the HUAWEI CLOUD SDKs page, download and decompress the Content Moderation Node.js SDK. The structure and content of the decompressed package are described as follows:
    ├── javascript
    │   ├── data                                # Sample image
    │   ├── moderation_sdk                      # Content Moderation SDK code
    │   │   ├── ais.py                         # Constant configuration of Content Moderation
    │   │   ├── image_moderation.js            # Image Moderation SDK code
    │   │   ├── signer.js                                     
    │   ├── moderation_image_aksk_demo.py       # Image Moderation AK/SK demo 
    │   ├── moderation_image_token_demo.py      # Image Moderation token demo
    │   ├── README.md                          # Description and precautions of Content Moderation SDK
  2. On the WebStorm page, choose File > Open File or Project, select the path for storing the decompressed SDK package, and import the SDK package. See Figure 1.

    node_modules is the installation path of the JavaScrip SDK dependency package of Content Moderation. It depends on the moment-timezone and moment modules.

    Figure 1 Project directory after importing the SDK