go-chat

module
v0.0.0-...-f65745d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: Unlicense

README

go-chat

go-chat is a golang udp server/udp client/web application example


Key Features

  • Handle many chatters/users at the same time
  • Store up to 20 messages
  • Chatter can delete his own messages as long as he is connected
  • When everyone leaves the room, all data is flushed

How It Works

There are 3 essencial parts of this project:

  • Web Client (front-end)
  • Web Server/UDP Client (back-end)
  • UDP Server (back-end)

Flow

When a user perform an action in the Web Client, the Web Client send a message to Web Server;
Web Server reads the message, translate and send it to UDP Server;
UDP Server reads the message, perform the action and sends the message to all UDP Client (users);
UDP Client reads the message, translate and send it back to Web Client;
Web Client reads the message and perform the action;


How To Use

To clone and run this application, you'll need Git and Docker installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/albertojnk/go-chat.git

# Go into the repository
$ cd go-chat

# Install docker -- please follow the instructions in the docker website provided above
...

# After docker is installed
$ docker-compose up

After docker compose is up and running, go to your browser at localhost:9000, insert your username to connect.

Note If you want to test features, on your second+ login use a different username and a different browser, otherwise the program does not work properly.


Credits

This software uses the following open source packages:


Contact Info

Linked-In  ·  GitHub  ·  Email

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL