Skip to content

PaulB-H/simple_sockets

Repository files navigation

Simple Sockets

Made with:
HTML, CSS, JS, Node.JS

simple-sockets
Heroku free tier gone... Not redeployed yet...
Redeployed on my server

Description

A lightweight chat application using Socket.IO

Details

  • Set a username, then join or create a room
  • Rooms can have passwords
  • No account / signup required
  • Usernames are freed when you disconnect
  • Rooms with 0 users are deleted

Some specific functionality I wanted:

  • Multi-line input
  • Enter key functionality:
    • On mobile, insert line break
    • On desktop, send message
  • Shift + Enter on desktop to insert line break
  • Expanding textarea**

* Normally a textarea does not auto-resize, I found a hack to create a "shadow clone" that matches the content of the textarea, becomes visible briefly to get a height, sets the hight of the real textarea to match, before hiding again.

Profanity filtering

Currently this is only enabled for usernames, I am interested in a more efficient way to do long messages.

Libraries / Frameworks / Packages