2.1.2 • Published 6 years ago

serverless-iot-local v2.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

serverless-iot-local

AWS Iot lifecycle and regular topic subscription events

Prerequisites

  • serverless@1.x
  • redis

Install

1) npm install --save serverless-iot-local

2) In serverless.yml add serverless-iot-local to plugins:

plugins:
  - serverless-iot-local

Usage

  1. Start redis:
    redis-server

  2. If you're using serverless-offline, you can run:

    sls offline start

    Otherwise run:

    sls iot start

CLI options are optional:

--port                -p  Port to listen on. Default: 1883
--httpPort            -h  Port for WebSocket connections. Default: 1884
--noStart             -n  Prevent Iot broker (Mosca MQTT brorker) from being started (if you already have one)
--skipCacheValidation -c  Tells the plugin to skip require cache invalidation. A script reloading tool like Nodemon might then be needed (same as serverless-offline)

The above options can be added to serverless.yml to set default configuration, e.g.:

custom:
  serverless-iot-local:
    start:
      port: 1884
    # Uncomment only if you already have an MQTT server running locally
    # noStart: true
    redis:
      host: 'localhost'
      port: 6379
      db: 12

Using with serverless-offline plugin

Place serverless-iot-local above serverless-offline

plugins:
  - serverless-iot-local
  - serverless-offline

Todo

  • Improve support of AWS Iot SQL syntax

License

MIT

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago