A command line chat application using Pusher's Chatkit
In order to run the app locally you need to create a Chatkit instance first. Go to https://dash.pusher.com/chatkit, login into your account and create a chatkit instance in INSTANCE INSPECTOR. Replace the Instance Locator and the Secret Key at the code files and you are good to go.
// Chatkit Server SDK
const chatkit = new Chatkit.default({
instanceLocator: "Your instance locator",
key: "Your key"
});
// Init chatkit manager
const chatManager = new ChatManager({
instanceLocator: "Your instance locator",
userId: username,
tokenProvider: new TokenProvider({
url: "http://localhost:3000/authenticate"
})
});
npm install
# Clone the repository
git clone https://github.com/pankaryp/chatkit-cli-app.git
cd chatkit-cli-app
node server.js
Open two different terminal windows and run:
node app.js
Inspired by Alex Booker's (@bookercodes) tutorial.
This project is licensed under the MIT License - see the LICENSE.md file for details.