Giter Club home page Giter Club logo

react-chat's Introduction

React Chat

Motivation

This project was dedicated to working with WebSockets and ReactJS/Redux in tandem. What better than a chat app to do so? Keep in mind, this was a weekend project, there are still a lot of improvements that can be done to this app.

Live Demo

You can see a live demo of the app here. Use server chat.lgse.net:1337 and encryption SSL/TLS

Requirements

  • Node.JS ^4.0.0
  • NPM ^3.0.0
  • Redis

Installation

git clone https://github.com/lgse/react-chat.git
npm install
npm run build:dist

Before Starting

By default, the chat server will run on port 1337 and connects to the Redis service via port 6379. Ensure that the appropriate firewall rules are in place for clients to be able to connect.

The WebSockets are using the unsecured ws:// protocol by default but can be configured to use SSL/TLS. The server configuration file is located in /bin/chat-server/config.json

Refer to the Primus library documentation for more info

A sample configuration for SSL would be:

{
  "redis": {
    "channel": "react-chat",
    "host": "127.0.0.1",
    "port": 6379
  },
  "primus": {
    "port": 1337,
    "root": "/folder/with/https/cert/files",
    "cert": "myfilename.cert",
    "key": "myfilename.cert",
    "ca": "myfilename.ca",
    "pfx": "filename.pfx",
    "passphrase": "my super sweet password",
    "transformer": "websockets"
  },
  "webServer": {
    "port": 80
  }
}

How to start the Chat Server / WebServer

This will start both the chat server and webserver

npm run chat-server

You can also run the chat server standalone if you choose to host the static content using a different web server

npm run chat-server:standalone

react-chat's People

Contributors

l0gicgate avatar

Stargazers

William Nguyen avatar qiawu avatar Mark West avatar Fredy A Gomez avatar Gino Tria avatar Connor Elsea avatar Braunson Yager avatar  avatar Ben Nolan avatar Hady Mahmoud avatar Germán Méndez Bravo avatar Meril avatar 3λiȯ+ avatar  avatar Steve LoFurno avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.