1.0.5 • Published 8 years ago

reichat-server v1.0.5

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

reichat-server

The real-time paint chat server for reichat.

npm version Linux Build Windows Build Dependency Status devDependency Status

Build

$ npm install
$ npm run tsd reinstall
$ npm run tsd rebundle
$ npm run build

Example

var util = require('util');
var path = require('path');
var os = require('os');
var reichatServer = require('reichat-server');

// All settings are optional.
var config = {
	title: 'PaintChat',
	canvasWidth: 1920,
	canvasHeight: 1080,
	layerCount: 3,// recommended up to 3.

	// HTTP server for distributing chat client app.
	clientDir: [__dirname, 'www'].join(path.sep),
	clientVersion: '0.0.0',

	// File System options.
	dataDir: os.tmpDir,// if supplied, chat session will persist.
	dataFilePrefix: 'reichat_exampleroom_001_',

	// Redis options. ()
	redisHost: 'localhost',// if supplied, activate Redis communication. (will disable saving to File System)
	redisPort: 6379,
	redisPassword: '',
	redisKeyPrefix: 'reichat:exampleroom#001:',// for shared Redis.

	// for security
	forwardedHeaderType: 'XFF'// use in trusted proxy
};

reichatServer.createServer(config).once('ready', function () {
	
	process.title = 'reichat server - ' + this.id;
	
	this.listen(10133, '0.0.0.0', null, function () {
		util.log(util.format('listening on %s:%s', '0.0.0.0', '10133'));
	});

	util.log(util.format('created server id: %s', this.id));
});

License

MIT

Logo

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago