https://github.com/imightexist/minichat-v2
minichat 2.0
https://github.com/imightexist/minichat-v2
Last synced: 2 months ago
JSON representation
minichat 2.0
- Host: GitHub
- URL: https://github.com/imightexist/minichat-v2
- Owner: imightexist
- Created: 2022-10-09T19:12:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T00:51:03.000Z (over 2 years ago)
- Last Synced: 2025-01-05T00:44:01.684Z (4 months ago)
- Language: HTML
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minichat-v2
minichat 2.0demo: http://incongruous-brindle-dew.glitch.me/
demo2: http://104.192.0.82:81/# Funny html element things
- (img)url(/img) - display image url
- (b)text(/b) - bold text
- (i)text(/i) - italics# make a chatbot
This uses JSON.stringify to encode messages into string. Of course, that means JSON.parse decodes the strings to messages. So the client message must be JSON.## Send
- ["rename",string] - rename client to string
- ["chat",string] - send string
## Receive
- ["username",name] - server assigned a username (also response to rename)
- ["chat","<b>(user)</b>: (msg)"] - server sends html message
- ["logs",array] - gives array of html strings for logs
- ["users",array] - gives array of strings of usernames