Simple web chat using aws websocket
├── handlers
│ ├── app.js
│ ├── package.json
│ └── utills.js
├── index.html
├── Makefile
├── README.md
├── samconfig.toml
└── template.yaml
- AWS SAM CLI / AWS SDK for JavaScript
- AWS S3
- AWS API Gateway
- AWS Lambda
- AWS DynamoDB
- AWS CloudWatch Logs
make build_and_deploy
make run_app
To test the WebSocket API, you can use wscat, an open-source command line tool.
$ npm install -g wscat
- On the console, connect to your published API endpoint by executing the following command:
$ wscat -c wss://{YOUR-API-ID}.execute-api.{YOUR-REGION}.amazonaws.com/{STAGE}
- To test the sendmessage:
$ wscat -c wss://{YOUR-API-ID}.execute-api.{YOUR-REGION}.amazonaws.com/prod
connected (press CTRL+C to quit)
> {"action":"sendmessage", "data":"hello world"}
< hello world