Coder Social home page Coder Social logo

chathub-server's Introduction

chathub-server

ChatHub is a simple chatroom application for your Github projects; featuring websockets, Github Login, Emojicons and code syntax highlighting!

ChatHub Demo: http://chathub.github.io/

chathub-client is the frontend application built to be hosted on any static host, including GitHub Pages!

chathub-server is the backend websocket/OAuth server used to connect the sockets from the client application.

##Installation##

Setting up chathub-server is simple, just follow the steps below:

  1. Register your application at: https://github.com/settings/applications/new

  2. Clone and install

$ git clone https://github.com/alfg/chathub-server.git
$ cd chathub-server
$ npm install
  1. Open config.js.sample and configure
config.GITHUB_ID = 'your github application id';
config.GITHUB_SECRET = 'your github application secret';
  1. Rename config.js.sample to config.js and run the app
$ mv config.js.sample config.js
$ node bin/www

Load http://localhost:3000 into the browser

  1. The backend websocket/oauth server is set. Next, setup chathub-client if not already. https://github.com/alfg/chathub-client

Sample nginx config

server {
    listen 80;

    server_name chathub-server.alfg.co;
    access_log /var/log/nginx/chathub-server.access.log;
    error_log /var/log/nginx/chathub-server.error.log;


    location / {
        proxy_pass         http://127.0.0.1:3000/;
        proxy_redirect     off;
        proxy_set_header   Host             $http_host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

License

chathub-server is open-source under the MIT License.

Credits

chathub-server uses the following technologies, check them out!

chathub-server's People

Contributors

alfg avatar

Watchers

 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.