API
The API is using a framework called Hono, which allows for easy serverless development. Configuration of Hono is not required, and you simply just need to go and add your routes inserver/lambda/index.ts. It is very similar to Express just with more support for serverless.
server/lambda/index.ts
AWS object. We are using AWS CDK, which allows for easy serverless development, the API reference documentation can be found here.
WebSocket
We are using thews library, which is supported by AWS API Gateway. Documentation for ws can be found here.
All Websocket files are found in server/websocket and each route has its own file. A simple route consists of the handler, and even and any other code.
server/websocket/check.ts
returning data to client
server/lib/websocket-stack.ts. There are two steps that you need to do.
You will first need to add the handler. Add it underneath the AWS Lambda Node.js functions handlers haeder comment.
server/lib/websocket-stack.ts
server/lib/websocket-stack.ts
Websocket Request
This is what a simple websocket request should look like.websocket request

