Real time messenging web app using Stream.
SERVER
- Download Server from Here or clone it using the command below.
git clone https://github.com/jamesindeed/rt-messenger-server.git
- Rename .env.example to .env and fill in your own info.
- Run below to install packages
npm i
- Run below to start Server on localhost:5000.
npm start
CLIENT
- Clone server using command below.
git clone https://github.com/jamesindeed/rt-messenger.git
- Rename .env.example to .env and fill in your own info.
- Run below to install packages
npm i
- Run below to start Client on localhost:3000.
npm start // Open http://localhost:3000 to view it in the browser.
To aquire all stream keys for the .env file. Sign up for an account here.
const EditChannel = ({ setIsEditing }) => {
const { channel } = useChatContext();
const [channelName, setChannelName] = useState(channel?.data?.name);
const [selectedUsers, setSelectedUsers] = useState([]);
const updateChannel = async (event) => {
event.preventDefault();
const nameChanged = channelName != (channel.data.name || channel.data.id);
if (nameChanged) {
await channel.update(
{ name: channelName },
{ text: `Channel name changed to ${channelName}` }
);
}
if (selectedUsers.length) {
await channel.addMembers(selectedUsers);
}
setChannelName(null);
setIsEditing(false);
setSelectedUsers([]);
};
If something is not behaving intuitively, it is a bug and should be reported. Report it here by creating an issue: https://github.com/jamesindeed/rt-messenger/issues
Your patches are welcome. Here's our suggested workflow:
- Fork the project.
- Make your feature addition or bug fix.
- Send us a pull request with a description of your work. Bonus points for topic branches!