Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Stream Group Chat Tutorial: create channel
// server/server.js
app.get("/create-channel", async (req, res) => {
const user_id = req.query.user_id;
const sample_channel = server_side_client.channel('messaging', 'sample-room1', {
name: 'Sample Room 1',
image: 'http://bit.ly/2O35mws',
created_by_id: user_id,
});
const create_channel = await sample_channel.create();
console.log("channel: ", create_channel);
res.send('ok');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.