A Node.js Web of Things server and gateway for Linux based devices such as the Raspberry Pi, Beaglebone, Edison or Samsung Artik
npm install webofthingsAny Windows or *Nix device really but if you want to use the GPIOs you will need an embedded device.
The framework was tested on the Raspberry Pi (A, B, B+, Zero and 2) and the Beaglebone Black.
Most of the code also works on the Intel Edison.

Install it: npm install webofthings
Run it: node wot.js or sudo node wot.js if you plan to use the temperature and humidity plugins.
The WoT gateway can be tweaked by changing the configuration parameters in /resources/piNoLd.json.
The following parameters are available:
```
"customFields": {
"hostname":"localhost",
"port": 8484,
"secure": true, // true means the gateway will require HTTPS and an API key
"dataArraySize" : 30 // size of the Properties and Actions arrays.
},
If you use it in a serious environment make sure you:
1. Generate/buy your own TLS certificates to replace the public certificate and private key in /resources.cKXRTaRylYWQiF3MICaKndG4WJMcVLFz
2. Make sure you generate a new API token to replace the default one () in/resources/auth.json, you can use the utils.generateApiToken() function to generate a new one.
The WoT Gateway framework comes with three internal plugins to connect it to sensors and actuators:
* dht22Plugin.js to connect a temperature and humidity sensorledsPlugin.js
* to connect it to LEDspirPlugin.js
* to connect it to a passive infrared sensor
but it can easily be extended by adding internal or external plugins (i.e., to serve the resources
of other devices via a Web API) extending corePlugin.js.
1. Install mocha npm install -g mochamocha`
2. Run the tests