Run the Electron demo

更新时间:
复制 MD 格式

This topic describes how to run the Electron demo.

Prerequisites

You have obtained authentication information from the console. For more information, see Console user guide.

Note

The token obtained from the console is for development and testing only. Using this token in a production environment poses a security threat. For your production environment, you must build a server to generate tokens and use the HTTPS protocol. For more information, see Generate a token on the server-side.

Procedure

  1. Download and decompress the software development kit (SDK) and sample code from GitHub or Gitee.

  2. In the `src/renderer/src/config.json` file, update the `appId` and `appKey` parameters with the values that you obtained from the console.

  3. Run the demo:

    npm install
    npm start
  4. Package the demo:

    # windows
    npm run build:win 
    
    # mac
    npm run build:mac