Giter Site home page Giter Site logo

websockets-homework's Introduction

WebSockets Homework

Module 4 homework | Turing School of Software & Design


Summary

This assignment was an exercise in working with websockets for the first time. Our objective was to create a very basic chat room where users can see when another user has joined, is typing, or has left. Sent messages are displayed along with usernames. There is very little CSS for this application because understanding websockets was my main goal.

For this assignment, we followed the tutorial at: https://socket.io/get-started/chat/

Screenshot

Setup

Clone this repo

git clone https://github.com/michellehoffman/websockets-homework.git

Install packages

npm install

Start the server

node index.js

Navigate to localhost in your browser

localhost:3000

To see the websocket in action, I recommend opening 2 browser windows side-by-side.

Learning Goals

  • Understand what it means for an application to be β€œreal time.”
  • Understand the pub/sub model
  • Understand how WebSockets work
  • Set up a basic Node.js server using Express
  • Implement pub/sub in the browser using Socket.io

Personal Challenges

I originally had a hard time wrapping my head around the concept of a websocket. Creating a real-time application sounded like such an advanced task when, at the time, I was just starting to learn about creating back ends for an applications. Working through this project really helped me start to understand what is happening behind the scenes of a real-time application.

websockets-homework's People

Contributors

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