Code Monkey home page Code Monkey logo

canopy-node-client's Introduction

canopy-node-client

Canopy client for Node.js

Create a Canopy account

  • Go to www.canopy.link
  • In the top right corner of the window, click Log In
  • Complete the information under Sign Up

Create a Device

  • Go to www.canopy.link
  • In the top right corner of the window, click Log In
  • In the bottom left corner of the dashboad, click Create Devices
  • Enter the device name and click Create Devices

Set a Canopy cloud variable from Node REPL

  • Get the Device Id and Secret Key from the web dashboard (select the device, this will update the card on the right, choose the Details option on the card's menu bar.

  • cd into your project, then install the canopy client:

	npm install canopy-node-client --save
  • In the termial type 'node' to drop into the REPL, then type:

    var canopy = require('canopy-node-client');

    var myDevice = canopy.Device;

    myDevice.id('your device id');

    myDevice.auth('your device id:your device secret key');

    myDevice.set('your cloud var', value);

  • Get the device state to check to see that the value has updated with:
	myDevice.get();

Set a Canopy cloud variable via example script

  • Get the Device Id and Secret Key from the web dashboard (select the device, this will update the card on the right, choose the Details option on the card's menu bar.

  • cd into your project, then install the canopy client:

	npm install canopy-node-client --save
  • cd into node_modules/canopy-node-client/example

  • open update.js and fill in your Device Id and Secret Key where directed in the file.

  • Save the file

  • In the terminal, type

	node update 'my_cloud_varible' value
	(i.e. node update 'sensor_reading' 12374)

canopy-node-client's People

Contributors

gregulator avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.