:fire: An online poker game server powered by Redis, node.js and socket.io
An online poker game server powered by redis, node.js and socket.io
Game rules supported:
Features:
TODO List:
Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
[sudo] npm install pm2 -g
[sudo] npm install casino-server -g
# run redis-server first
redis-server &
# run as service and cluster mode
pm2 start `which casino-server` -i 0
git clone https://github.com/floatinghotpot/casino-server.git casino
cd casino
npm install
# sudo npm install -g gulp
# gulp build
node bin/casino-server [options]
Now you can visit http://localhost:7000, it's a web-based game client for testing and demo purpose.
# open a browser to access the test web page
open http://localhost:7000/
-p Port to use (defaults to 7000)
-h Host address to use (defaults to 0.0.0.0)
-r Address of Redis server (defaults to 127.0.0.1:6379)
With Redis as the message bus, it's very easy for tools to work with the open architecture.
Start the event logger to monitor the events:
bin/logger.js
Or, log the events into log file:
bin/logger.js -o ./tmp/casino.log
This poker game server is created by Raymond Xie, published under MIT license.
It can be used for FREE, but be aware that:
If you are interested in this project, you can contribute in any of following aspects: