Giter Club home page Giter Club logo

learn-websocket-go's Introduction

Websocket Practice

Description

This is a simple websocket practice project. It is a simple chat application that allows users to send messages to each other in real time. and it build just the Server, the client side is not included. And also this project is inspired by this video (https://youtu.be/BcuXtC4afzU?si=HPjwiARhpeWNKWOL)

Installation

make sure you already have go installed on your machine.

  1. Clone the repository
  2. run this command
go run main.go
  1. go to postman or any other tool that can send websocket request and send a request to, and make sure name is not empty
ws://localhost:9000/ws/chat?name=yourname
  1. then click connect, after conected then you can send message in field message
First Image

type the message in here

Second Image
  1. repeat step 3 and 4 to add more user and then see the magic
Third Image

message form user 1 is send to all user that connected to the server, as you can see i was in user2 request screen and then i get message from user1

learn-websocket-go's People

Contributors

daffa09 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.