These instructions are AWS-specific but similar requirements will apply to other cloud providers.
- Spin up an EC2 instance.
- Ensure that the vpc has an internet gateway attached to it so that it can be publicly accessed.
- Ensure that the security group allows inbound traffic on port 3000 (for server) and 22 (for ssh access).
- Download the simple-chat-app repository to the EC2 instance.
- Install the required dependencies by running
pip install -r requirements.txt
. - Run the server by running
cd server; python main.py --use_aws [--use_grpc]
. - Edit the client/main.py file to change the
aws_host
variable to the public IP of the EC2 instance. - Run the client by running
cd client; python main.py --use_aws [--use_grpc]
.
If you want to generate the grpc stubs yourself, you can do so by running the following commands:
./generate_grpc_stubs.sh
Non-gRPC version: cd server; python main.py
gRPC version: cd server; python main.py --use_grpc
Mismatch in gRPC version between server and client will cause undefined behavior.
Non-gRPC version: cd client; python main.py
gRPC version: cd client; python main.py --use_grpc
Mismatch in gRPC version between server and client will cause undefined behavior.
The UI will ask for your username. You will not be able to log into a username if that username is already logged in elsewhere.
After entering your username, pending messages will be displayed.
Into the prompt >
you can perform the following actions:
list
will list all users.send <user>
will initiate a send to a recipient user. Enter the message to be sent in the following prompt>>>
.delete <user>
will delete a user. You cannot delete yourself and you cannot delete a user who is logged in elsewhere.quit
will quit the client, shutting down the connection.