This is a Serverless project which creates a websocket chat backend. It's quite basic, but supports some standard features including setting a nickname, multiple channels, and broadcasting messages to channel members. The coolest this is that this is entirely serverless and in Python!
- Add AWS credentials into the
envs/$(whoami)file. This file can be named anything, but I suggest your username or something else specific. You can just name it
envs/devas well. See
envs/examplefor help. Use
us-west-2as your default region, others will not function properly.
- Start up the shell with docker:
ENV=$(whoami) make shellNOTE: The value after
ENV=is merely the name of the file you created. So if you created the
ENV=dev. Now you're in your Docker container which has all of the necessary libraries and tooling.
Run all of the following commands in your Docker container!
- This will deploy everything you need to AWS. You'll see a websocket URI from the output of that command, something like
wscatby just running
yarn(still in the
- In two different terminals:
./node_modules/.bin/wscat -c wss://YOUR_WS_ENDPOING
- Now start typing...you'll see messages from one window pop up into another.
/name bz- Change your display name to
/channel random- Change to the
randomchannel. Default channel is
This project was bootstrapped using the my Serverless Cookiecutter template. This is a opinionated setup in order to facilitate developing, running and bootstrapping Serverless projects authored in Python.
For more information, see the following: