Skip to content

chrismetzgr/chatapp-back-end

Repository files navigation

ChatApp: The Back End

The back end of ChatApp is built with Express, SocketIO, and access to a TURN server provided by Twilio. An infinite amount of chat users can join four user live streams and interact in real time. The live app is hosted by Render here (please allow a few minutes for app to spin up).

Installing & Running Locally

After forking and cloning the repo to your computer, cd into the directory in your terminal and run npm install. If you haven't already forked, cloned, and started the frontend application, visit the repository at this link for setup instructions. Run node app.js to launch the application locally.

This application uses WebRTC technology, and requires that RTCPeerConnections are established successfully through communication by released ICE candidates. If you're running the front and back ends of this application on your local network, you should have no problem using public STUN servers.

TURN Servers and Deploying

When hosting your application and expecting connections to be made across disparate networks, TURN servers are recommended. Read more about this here.

This application uses the TURN server available through a subscription to Twilio. Using the dotenv node package, configure your .env file to look as follows:

TWILIO_SSID=SSID_GOES_HERE
TWILIO_TOKEN=TOKEN_GOES_HERE

Or, if your environments variables are determined through your hosting provider, be sure to establish them there.

Routes to Configure Application State

A route has been established to configure the state of the application when it's visited by directly typing the URL into the address bar of your browser.

/clear-messages will clear the messages stored in an array in the application.

About

The back end of a video and text chat application built with Express and Socket.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •