IDEA to make this site standout why don't you make a live chatbox for people who have logged in?
AbuTahir @ Allah @lemm.ee Posts 91Comments 107Joined 3 mo. ago
AbuTahir @ Allah @lemm.ee
Posts
91
Comments
107
Joined
3 mo. ago
Removed
IDEA to make this site standout why don't you make a live chatbox for people who have logged in?
Audacious terror strike at Pahalgam, 27 tourists dead. Among the dead two foreign nationals from Israel and Italy. Ten others are injured.
What do you think of dome technology do you think it will be practical or feasible in future? especially because we are only 2 years away from artemis 3, do you see them being used on earth as well?
Muslim advocacy group to preference Greens above Labor in some seats despite disagreement on religious freedom
yes i meant separate instance also we just have to put this, dark souls wiki also uses it
You don’t need to rewrite the whole page—just inject the pieces for Socket .io and your chat UI where indicated. Here’s exactly what to add or change in existing HTML (THIS PAGE):
1. Include Socket.IO on the client
Find the closing
</head>
tag and just before it insert:2. Add the chat HTML
Find the closing
</body>
tag and just before it paste:3. Wire up the client-side JavaScript
Right below that (still before
</body>
), add:4. Ensure your server is serving this page and Socket.IO
On your Node/Express server (the same one you use to serve the Lemmy/lemm.ee front-end), you need to:
server.js
(or equivalent) are:Summary of “what changed” in your HTML
<script src="/socket.io/socket.io.js">
+ minimal CSS<div id="chat-container">…</div>
chat widget<script>…</script>
block to wire upio()
With those three small patches, your existing site will host a floating chat box that’s only usable by authenticated users. Let me know if you need help wiring up the session middleware or adjusting the styles!