1.0.19 • Published 5 years ago
aws-serverless-websockets-plugin v1.0.19
Serverless Websockets Plugin
1. Installation
Install the plugin by adding it to your service dependencies:
npm i serverless-websockets-plugin --save
2. Usage
Load the serverless-websockets-plugin
, then optionally provide a new API name and Route Selection Expression, and finally define your WebSockets events and their route keys:
service: serverless-websockets-service
# Load the plugin
plugins:
- serverless-websockets-plugin
provider:
name: aws
runtime: nodejs8.10
# Optional
websocketApiName: foobar
websocketApiRouteSelectionExpression: $request.body.action
functions:
connectionManagement:
handler: handler.connectionManagement
events:
- websocket:
routeKey: $connect
- websocket:
routeKey: $disconnect
defaultMessage:
handler: handler.default
events:
- websocket:
routeKey: $default
chatMessage:
handler: handler.chat
events:
- websocket:
routeKey: message
1.0.19
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
5 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago