Project: Intro_WebSockets

Content:

  • Native Web Browser Implementation for WS

  • WS Library for our server

  • Minimal configuration on the server

  • Broadcasts:

      * Client
    
      * Server
    
  • Manual reconnection in case of communication loss

Instructions

This repository contains the application divided into two parts:

  • Frontend: Folder client/, contains the user interface.
  • Backend: Folder server/, contains the websockets server.

Frontend

  1. Navigate to the client/ folder: cd client.
  2. Launch the server with npx http-server -o.
  • Notice: In the browser developer tools disable cachĂ© in Network.

Backend

  1. Navigate to the server/ folder: cd server.
  2. Clone the file env.template to .env.
  3. Setting the environment variables.
  4. Execute the comand: npm install.
  5. Start the server with npm run dev.