repl chat: Integrated global chat for
MrEconomical (2276)

repl chat yey

After making repl mail, I still wasn't satisfied. There was a mailing system now, but no way to chat in real time on itself. So I decided to make a chat system cool kek.


(yes I love this repl share post format dont judge)

  • Log in with repl auth - use repl auth to log in with your repl account @amasad
  • Integrated - repl chat pops up right on! I styled it based on the multiplayer chat so it is a little window on the bottom right. I just tweaked a few things to improve the UI where I saw fit. More on this in Usage Instructions
  • Fast - repl chat uses WebSocket to send chat messages in real-time
  • Message history - unlike many other chat applications cough cough and somewhat repl multiplayer chat itself cough cough repl chat stores the last 50 messages so you will have context every time you log on

Usage Instructions

To use repl chat in, save it as a bookmarklet. A bookmarklet is basically a bookmark that on click executes some javascript code, in this case adding the repl chat window to

  1. Create a new bookmark (name it whatever you want)
  2. In the url section, copy and paste this:
javascript:!function(){if(location.href.startsWith("")){const t=document.createElement("script");"repl_chat_script",t.src="",document.body.appendChild(t)}else alert("Go to to use repl chat!")}();
  1. Now, when you are on, if you want to add the repl chat window, simply click on the bookmark!

If you really wanted to, you could use the browser client here: but why tho?


You are viewing a single comment. View All
JordanDixon1 (445)

How do I make a chat for only me and my friends? In other words, how do I make a private chat after I fork the repl?

MrEconomical (2276)

@JordanDixon1 you're going to have to set up your own database

JordanDixon1 (445)

@MrEconomical How do I do that? Can you walk me through that?

MrEconomical (2276)

@JordanDixon1 ok sure, do you have discord or something

JordanDixon1 (445)

@MrEconomical No. however I can invite you to the repl I forked.

JordanDixon1 (445)

@MrEconomical How would I set up my own database?

MrEconomical (2276)

@JordanDixon1 get back on your repl im just going to give you a copy of my database without any data in it

JordanDixon1 (445)

@MrEconomical Ok, well now I have everything on there, but it still isn't working. The terminal returns with: Invalid value "undefined" for header "repl-chat-key"

MrEconomical (2276)

@JordanDixon1 you need to create a database key, then in the .env in repl chat put REPL_CHAT_KEY = your key here and in the config.json on the database put replChatKey: your key here as a JSON property

JordanDixon1 (445)

@MrEconomical could you change it for me and then show me what you changed? I have invited you to the database as well I believe.