dwaltrip / gosuji-node-server

Node.js server that sends real-time updates via websockets to clients on GoSuji

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js Server for GoSuji

This repository contains the code for the Node.js app that handles the realtime aspects of GoSuji (an app for playing the board game Go against others). Check out the live GoSuji app here.

The Node.js app connects to an instance of Redis and then subscribes to a Redis channel. The Rails app powering GoSuji sends data to the Node.js through the channel, and SockJS websockets are used to send data to the necessary clients.

To making working with the websockets much easier, I created a wrapper for SockJS. This wrapper adds socket.io style named events and rooms.

See the GoSuji readme for instructions on settting up and running the Node.js app locally.

Notes

I haven't yet completely separated the SockJS wrapper out into its own stand-alone npm package yet, so currently the code is both a part of this repository and its own repository. Cleaning that up is in the works.

About

Node.js server that sends real-time updates via websockets to clients on GoSuji


Languages

Language:JavaScript 100.0%