DEMO: Node.js

This chapter introduces how to call the Ultra Stream API in Node.js.

Download DEMO: ultra-stream-api-demo-nodejs.zip

DEMO Structure

ultra-stream-api-demo-nodejs
|
|-- httpUtils.js    // based on HTTP get and upload in Node.js
|-- xxxx.mwf        // the uploaded file called by upload-update-file in upload.js
|-- get.js          // request data using GET
|-- upload.js       // upload file using POST

Requirements

  • Operating System: macOS, Linux, Windows
  • Node.js Runtime: 8.x or newer; it is recommended that you use LTS Releases.

Running Mode

  1. Navigate into the DEMO directory in the terminal.
    cd ultra-stream-demo-nodejs
    
  2. Replace deviceIP with the tested IP address of device in get.js and upload.js
  3. Run get.js
    node get
    
  4. Run upload.js
    node upload
    

results matching ""

    No results matching ""

    results matching ""

      No results matching ""