Run the Sample JavaScript Enterprise Applications

Run the JavaScript sample enterprise applications to learn how to use the client software library APIs. The sample enterprise application reads humidity and temperature values of directly connected or gateway devices. The sample enterprise applications can also change device attributes by sending commands through Oracle Internet of Things Cloud Service.

  1. Run this command to install the HTTP server: npm install –g http-server.
    If you do not want to install the http-server node module, you can install an alternate HTTP server.
  2. Host the HTTP server in this directory: C:\Users\username\Documents\iot\csl\js .
  3. Open a command prompt and run this command to move to the js directory: cd C:\Users\username\Documents\iot\csl\js.
  4. Run this command to run the HTTP server: js http-server.
  5. Run the enterprise application:
    1. Open a web browser and enter this URL in the address bar:[id].conf.
    2. Press Enter.
    3. Select your JavaScript application.
    4. Select the device types to monitor.
    5. Select devices to monitor.
    6. Set the minimum and maximum temperature and humidity thresholds, reset the device, or turn it on or off.
  6. Confirm the device is sending humidity and temperature data to Oracle Internet of Things Cloud Service:
    1. Open the Oracle Internet of Things Cloud Service Management Console.

      The URL format to access the IoT management console is: <iot instance name>.<domain name>/ui

      For example: or

    2. Click the Menu (Menu icon) icon adjacent to the Oracle Internet of Things Cloud Service title on the Management Console.
    3. Click Devices.
    4. Click Alerts and Messages.
    5. Click the Messages tab and confirm there are incoming messages.