diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 93ed824..8cea3d0 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ -![LwMQN Network](https://raw.githubusercontent.com/lwmqn/documents/master/media/lwmqn_net.png) +![LWMQN Network](https://raw.githubusercontent.com/lwmqn/shepherd/master/docs/images/lwmqn.png)
**@lwmqn/shepherd** is a network server and manager for the Lightweight Message Queuing Network (LwMQN) -[![Greenkeeper badge](https://badges.greenkeeper.io/lwmqn/shepherd.svg?style=flat-square)](https://greenkeeper.io/) [![NPM version](https://img.shields.io/npm/v/shepherd.svg?style=flat-square)](https://www.npmjs.com/package/shepherd) [![NPM downloads](https://img.shields.io/npm/dm/shepherd.svg?style=flat-square)](https://www.npmjs.com/package/shepherd) [![Travis branch](https://img.shields.io/travis/lwmqn/shepherd/master.svg?maxAge=2592000&style=flat-square)](https://travis-ci.org/lwmqn/shepherd) -[![Coverage Status](https://coveralls.io/repos/github/lwmqn/shepherd/badge.svg?branch=master&style=flat-square)](https://coveralls.io/github/lwmqn/shepherd?branch=master) [![Gitter](https://img.shields.io/gitter/room/lwmqn/Lobby.svg?style=flat-square)](https://gitter.im/lwmqn/Lobby) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/) ![pr-welcoming-image](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square) @@ -38,6 +36,10 @@ Lightweight Message Queuing Network ([**LwMQN**](http://lwmqn.github.io)) is an * Easy to query resources on a Client Device with the URI-style path, and everything has been well-organized to ease the pain for you to create RPC interfaces for your webapps, such as RESTful and websocket-based APIs. * LwMQN Server is your local machine gateway and application runner. But if you like to let your machines go up cloud, why not? It's Node.js! +### Understanding Smart Objects and the IPSO Model + +![IPSO Model](https://raw.githubusercontent.com/lwmqn/shepherd/master/docs/images/ipso_model.png) + #### Acronyms and Abbreviations * **Server**: LwMQN server * **Client** or **Client Device**: LwMQN client (machine) @@ -56,6 +58,12 @@ Currently [Node.js 8.x LTS](https://nodejs.org/en/about/releases/) or higher is $ npm install @lwmqn/shepherd ``` +### Compabitility table + +| Shepherd versions /
Node.js versions | 8.x
LTS | 10.x
LTS | 11.x | 12.x
LTS | 13.x | +|--------------------------------------|------------|-------------|------|-------------|------| +| v0.8.0 | ✔ | ✘ | ✘ | ✘ | ✘ | + ------- ## Basic Usage diff --git a/docs/Basic-APIs.md b/docs/Basic-APIs.md index 20015f3..65422ef 100644 --- a/docs/Basic-APIs.md +++ b/docs/Basic-APIs.md @@ -30,14 +30,14 @@ Create a server instance of the `LwmqnShepherd` class. This document will use `q * Create a server and name it ```js -const LwmqnShepherd = require('lwmqn-shepherd') -const qserver = new LwmqnShepherd('my_iot_server') +const Shepherd = require('lwmqn-shepherd') +const qserver = new Shepherd('my_iot_server') ``` * Create a server that starts on a specified port ```js -const qserver = new LwmqnShepherd('my_iot_server', { +const qserver = new Shepherd('my_iot_server', { broker: { port: 9000 } @@ -47,7 +47,7 @@ const qserver = new LwmqnShepherd('my_iot_server', { * Create a server with other backend ([example from Mosca wiki](https://github.com/mcollina/mosca/wiki/Mosca-advanced-usage#--mongodb)) ```js -const qserver = new LwmqnShepherd('my_iot_server', { +const qserver = new Shepherd('my_iot_server', { broker: { port: 1883, backend: { // backend is the pubsubsettings seen in Mosca wiki page @@ -63,7 +63,7 @@ const qserver = new LwmqnShepherd('my_iot_server', { * Create a server with a default account. Only Clients connecting with this account is authenticated if you don't have an authentication subsystem. ```js -const qserver = new LwmqnShepherd('my_iot_server', { +const qserver = new Shepherd('my_iot_server', { account: { username: 'skynyrd', password: 'lynyrd' diff --git a/docs/Message-Encryption.md b/docs/Message-Encryption.md index 05d210a..62156de 100644 --- a/docs/Message-Encryption.md +++ b/docs/Message-Encryption.md @@ -30,7 +30,7 @@ Method of decryption. Overridable. **Encryption/Decryption Example:** ```js -const qserver = new MqttShepherd('my_iot_server') +const qserver = new Shepherd('my_iot_server') // In this example, I simply encrypt the message with a constant password 'mysecrete'. // You may like to get the password according to different qnodes by `clientId` if you have diff --git a/docs/images/ipso_model.png b/docs/images/ipso_model.png new file mode 100755 index 0000000..ddd7901 Binary files /dev/null and b/docs/images/ipso_model.png differ diff --git a/docs/images/lwmqn.png b/docs/images/lwmqn.png new file mode 100644 index 0000000..a9fa93d Binary files /dev/null and b/docs/images/lwmqn.png differ