- cp env.txt .env
- update the db details in the .env file
- if you want tests to work setup the TEST... variables as well
make build
- Executable is out/grpc-chat
- Migrate the db
./out/grpc-chat migrate
- Run the server
./out/grpc-chat server
- Run the client in console mode
./out/grpc-chat client console hostname port [ssl|nossl] use ssl if you have an nginx to terminate the ssl
- You should see
->
prompt
login <username> <password>
- this logs you in. The server doesnt do authentication rt now, so the key is useless
create_chat <chat name>
- creates a new chat
list_chats
- lists all the chats available on the server
-> list_chats
ChatName ChatID UserIDs
blublu 5fa89b3d-e154-44c4-ad41-785d8a330535 a39b2fdf-e5d0-41a1-8893-c4cfb7ae6bb0,fee1adb3-d969-4258-8907-224fa2bc284b
bumbum 8cd61367-8556-4bfb-a3aa-940b7f209700 a39b2fdf-e5d0-41a1-8893-c4cfb7ae6bb0
baby 8d8c3079-c679-4f29-81a7-114eb4e8fe44 a39b2fdf-e5d0-41a1-8893-c4cfb7ae6bb0
start_chat <chat name>
- use the first column from
list_chats
output.
- now just type and you should see the chat on all clients who have connected.
- other users will have their username prefixed
-> start_chat blublu
Hi I am param
anil:hello
anil:I am anil
quit
to exit a chat