Giter VIP home page Giter VIP logo

chatroom-websockets's Introduction

Introduction

Welcome to the chatroom!

This is a simple chat web application based on WebSockets. The application supports one chat room, and users must provide a password that is validated on the server side before accessing the chat.

Once inside the chat, users can immediately send messages that will be displayed to other users. New users joining the chat will have access to a message history, although the history doesn't persist in case of a server restart.

In case of errors, users will receive a message, and the error will be logged on the server side. The backend for this project makes use of Go, while the frontend uses TypeScript/JavaScript.

Note: All references to main.js in this project are referencing a compiled JavaScript file generated by the TypeScript compiler (tsc).

Instructions

Clone the repository from GitHub using:

 git clone https://github.com/chdavis0917/chatroom-websockets.git

Navigate to the cloned directory using:

cd chatroom-websockets

Install Typescript locally by running:

npm install

Make sure you have Go version 1.16 or higher installed on your machine.

Install the dependencies by running:

go mod download

Start the server in the root directory by running:

go run server/websocket_server.go

Open your web browser and go to http://localhost:8080 to access the chat application.

Enter the password "pw" to access the chatroom.

Open localhost:8080 in another tab or window to see a history of messages from other users.

See live chat updates from other users in the chat room!

chatroom-websockets's People

Contributors

chdavis0917 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.