Skip to content

Simple demo project to test out aws websocket implementation

Notifications You must be signed in to change notification settings

saifkhan192/aws-websocket-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-websockets-chat-app

Simple web chat using aws websocket

├── handlers
│   ├── app.js
│   ├── package.json
│   └── utills.js
├── index.html
├── Makefile
├── README.md
├── samconfig.toml
└── template.yaml

Tools

  • AWS SAM CLI / AWS SDK for JavaScript
  • AWS S3
  • AWS API Gateway
  • AWS Lambda
  • AWS DynamoDB
  • AWS CloudWatch Logs

Deploying to your account

make build_and_deploy

Run html app

make run_app

Testing APIs

To test the WebSocket API, you can use wscat, an open-source command line tool.

$ npm install -g wscat
  1. 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}
  1. 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

About

Simple demo project to test out aws websocket implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published