Last active
May 31, 2019 08:57
-
-
Save anchetaWern/de26c8d5f3918f34bdba5698efa4ea7d to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: create channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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