Add note to examples about installing API plugin

This commit is contained in:
Andrew Stewart 2015-01-12 08:58:41 -08:00
parent 1316763bac
commit 6e830bee34
8 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,8 @@
var Cylon = require("../.."); var Cylon = require("../..");
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api({ Cylon.api({
host: "0.0.0.0", host: "0.0.0.0",
port: "8080" port: "8080"

View File

@ -13,6 +13,8 @@ First, let's import Cylon:
Next up, we'll configure the API Cylon will serve, telling it to serve on port Next up, we'll configure the API Cylon will serve, telling it to serve on port
`8080`. `8080`.
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api({ Cylon.api({
host: '0.0.0.0', host: '0.0.0.0',
port: '8080' port: '8080'

View File

@ -2,6 +2,8 @@
var Cylon = require("../.."); var Cylon = require("../..");
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api(); Cylon.api();
Cylon Cylon

View File

@ -2,6 +2,8 @@
var Cylon = require("../.."); var Cylon = require("../..");
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api(); Cylon.api();
Cylon.robot({ Cylon.robot({

View File

@ -2,6 +2,8 @@
var Cylon = require("../.."); var Cylon = require("../..");
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api(); Cylon.api();
Cylon.robot({ Cylon.robot({

View File

@ -16,6 +16,8 @@ First, let's make sure to load up Cylon:
Now that we've got that, let's set up the api: Now that we've got that, let's set up the api:
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api(); Cylon.api();
And with that done let's define our robot: And with that done let's define our robot:

View File

@ -2,6 +2,8 @@
var Cylon = require("../.."); var Cylon = require("../..");
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api({ host: "0.0.0.0", port: "8080" }); Cylon.api({ host: "0.0.0.0", port: "8080" });
Cylon.robot({ Cylon.robot({

View File

@ -7,6 +7,8 @@ First, let's import Cylon:
Next up, we'll configure the API Cylon will serve, telling it to serve on port Next up, we'll configure the API Cylon will serve, telling it to serve on port
`8080`. `8080`.
// ensure you install the API plugin first:
// $ npm install cylon-api-http
Cylon.api({ host: '0.0.0.0', port: '8080' }); Cylon.api({ host: '0.0.0.0', port: '8080' });
Now that we have Cylon imported, we can start defining our Pebble robot: Now that we have Cylon imported, we can start defining our Pebble robot: