Skip to content

mtannerfors/twiliochat-node

 
 

Repository files navigation

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_AUTH_TOKEN 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 (your TWILIO_AUTH_TOKEN is the same as the SECRET for your generated API key). For TWILIO_IPM_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

    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.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.4%
  • CSS 14.8%
  • HTML 12.8%