Jean1
January 31, 2021, 5:57pm
1
System Information
Strapi Version : 3.3.4
Operating System :
Database : Mongo
Node Version : 12.16.1
NPM Version :
Yarn Version : 1.19.1
I would like to know if there a way to create a chat discussion system with strapi ?
I would like an basic user can discuss about a content type created by an author user, and of course the user author can answer to the basic user with the strapi BO.
Hi there Jean1
someone has written about this on medium: Adding Real-Time in Strapi with Socket.io | by Adfab 🚀 | Strapi | Medium
comes down to using socket.io for real time
This not work anymore, When i copy the code to boostrap.js i have error
[2021-02-24T01:51:54.546Z] error TypeError: cb is not a function
dhruv
March 2, 2021, 4:37am
4
@Jean1 This is how I integrated socket.io with strapi
filename: bootstrap.js
module.exports = async () => {
process.nextTick(() => {
const io = require('socket.io')(strapi.server);
io.on('connection', async (socket) => {
// new connection
}
});
}
1 Like