{"id":13812855,"url":"https://github.com/serverless/serverless-websockets-plugin","last_synced_at":"2025-05-14T22:31:13.063Z","repository":{"id":45827703,"uuid":"162342535","full_name":"serverless/serverless-websockets-plugin","owner":"serverless","description":"Websocket support for Serverless Framework on AWS","archived":true,"fork":false,"pushed_at":"2019-02-21T09:16:43.000Z","size":159,"stargazers_count":148,"open_issues_count":0,"forks_count":82,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-20T07:19:13.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-18T20:36:28.000Z","updated_at":"2025-02-11T15:50:50.000Z","dependencies_parsed_at":"2022-09-18T11:41:42.958Z","dependency_job_id":null,"html_url":"https://github.com/serverless/serverless-websockets-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-websockets-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-websockets-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-websockets-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless%2Fserverless-websockets-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless","download_url":"https://codeload.github.com/serverless/serverless-websockets-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239521,"owners_count":22037720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:00:56.606Z","updated_at":"2025-05-14T22:31:08.004Z","avatar_url":"https://github.com/serverless.png","language":"JavaScript","readme":"# Serverless Websockets Plugin\n\n## Deprecation Notice\nThis repo is now deprecated, and we are no longer maintaining it. v1.38.0 of the framework now includes built-in support for websockets. [Please check the docs for more info](https://serverless.com/framework/docs/providers/aws/events/websocket/)\n\n## 1. Installation\nInstall the plugin by adding it to your service dependencies:\n```\nnpm i serverless-websockets-plugin --save\n```\n\n**Note:** Because this plugin uses the new `ApiGatewayV2` service in the AWS SDK, it requires v1.35.0+ of the Serverless Framework.\n\n## 2. Usage\nLoad 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:\n```yml\nservice: serverless-websockets-service\n\n# Load the plugin\nplugins:\n  - serverless-websockets-plugin\n\nprovider:\n  name: aws\n  runtime: nodejs8.10\n  \n  # Optional\n  websocketApiName: foobar\n  websocketApiRouteSelectionExpression: $request.body.action\n\nfunctions:\n  connectionManagement:\n    handler: handler.connectionManagement\n    events:\n      - websocket:\n          routeKey: $connect\n      - websocket:\n          routeKey: $disconnect\n  defaultMessage:\n    handler: handler.default\n    events:\n      - websocket:\n          routeKey: $default\n  chatMessage:\n    handler: handler.chat\n    events:\n      - websocket:\n          routeKey: message\n  twoWayMessage:\n    handler: handler.twoWay\n    events:\n      - websocket:\n          routeKey: twoway\n          # The property below will enable an integration response in the API Gateway.\n          # See https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-response.html\n          routeResponseSelectionExpression: $default\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fserverless-websockets-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless%2Fserverless-websockets-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless%2Fserverless-websockets-plugin/lists"}