RafalWilinski / serverless-websockets-chat

Realtime chat app based on AWS Lambda, API Gateway, DynamoDB, Websockets, React in TS
https://rwilinski.me
20 stars 4 forks source link

Serverless natively supports websockets, no need for serverless-websockets-plugin #1

Open breeko opened 5 years ago

breeko commented 5 years ago

When running npm run deploy using specs below, I get a Serverless Error: You need to set the "route" when using the websocket event.

Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           8.11.2
     Serverless Version:     1.39.1

Since Serverless now supports websockets, you can remove serverless-websockets-plugin and change routeKey to route

breeko commented 5 years ago

Also, stack.sh should change as the Base Url key is no longer available

echo "{ \"ServiceEndpoint\": \"$(serverless info --verbose | grep 'ServiceEndpointWebsocket' | sed s/ServiceEndpointWebsocket:\ //g)\" }" > ../frontend/src/stack.json