Skip to content
Node implementation of Twilio Chat
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
public Update Chat Client Initialization Dec 7, 2018
routes Bump to latest next-gen version Apr 27, 2017
services Use ChatGrant instead of IP Messaging Grant Nov 2, 2018
test
views
.env.example
.gitignore
.travis.yml General updates Mar 16, 2018
LICENSE
README.md
app.js Bump Version Apr 27, 2017
karma.conf.js
package-lock.json Update npm dependencies Nov 2, 2018
package.json Use ChatGrant instead of IP Messaging Grant Nov 2, 2018

README.md

Twilio

Twilio Chat - Node

Build Status

Node.js | Express implementation of Twilio Chat

Local Development

  1. First clone this repository and cd into its directory:

    git clone https://github.com/TwilioDevEd/twiliochat-node.git \
    cd twiliochat-node
  2. Install project's dependencies:

    npm install
  3. Copy the sample configuration file and edit it to match your configuration.

    cp .env.example .env

You can find your TWILIO_ACCOUNT_SID in your Twilio Account Settings.

For TWILIO_API_KEY and TWILIO_API_SECRET you need to go to API Keys in the console. There youl'll be able to create a new API key obtaining the two required values.

For TWILIO_CHAT_SERVICE_SID you can go to the Programmable Chat dashboard, where you must create a Chat Messaging Service. When the service is created you'll have access to the service's SID.

  1. Start the development server on http://localhost:3000

    npm start

Expose your localhost to the internet

If you want your chat application to be reachable publicly in the internet, you can use a service like ngrok.

  1. Expose the application to the wider Internet

    ngrok http 3000

Run the tests

  1. Run backend tests

    npm test
  2. Run javascript tests:

    cd public \
    npm install \
    npm test

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.
You can’t perform that action at this time.