# reichat-server

> The real-time paint chat server for reichat.

Latest version **1.0.5** (published 2016-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install reichat-server
pnpm add reichat-server
yarn add reichat-server
bun add reichat-server
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-09-11 |
| First published | 2015-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Yuki KAN |
| Maintainers | kanreisa |
| Keywords | reichat |

## Links

- npm: https://www.npmjs.com/package/reichat-server
- Repository: https://github.com/kanreisa/reichat-server
- Issues: https://github.com/kanreisa/reichat-server/issues
- npm.io page: https://npm.io/package/reichat-server

## Dependencies (5)

- [redis](https://npm.io/package/redis.md) ^0.12.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.2
- [png-async](https://npm.io/package/png-async.md) 0.9.0
- [socket.io](https://npm.io/package/socket.io.md) ^1.3.6

## Recent versions

- 1.0.5 (latest) — 2016-09-11
- 1.0.4 — 2015-08-30
- 1.0.3 — 2015-03-02
- 1.0.2 — 2015-02-28
- 1.0.1 — 2015-02-25
- 1.0.0 — 2015-02-25

## README

# reichat-server
The real-time paint chat server for **[reichat](https://github.com/kanreisa/reichat)**.

[![npm version][npm-img]][npm-url]
[![Linux Build][travis-img]][travis-url]
[![Windows Build][appveyor-img]][appveyor-url]
[![Dependency Status][dep-img]][dep-url]
[![devDependency Status][devdep-img]][devdep-url]

## Build

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

## Example

```js
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](LICENSE)

![Logo](https://yabumi.cc/14b08e54b51e2abe7c7a55c7.svg)

[npm-img]: https://img.shields.io/npm/v/reichat-server.svg
[npm-url]: https://npmjs.org/package/reichat-server
[travis-img]: https://img.shields.io/travis/kanreisa/reichat-server.svg
[travis-url]: https://travis-ci.org/kanreisa/reichat-server
[appveyor-img]: https://img.shields.io/appveyor/ci/kanreisa/reichat-server.svg
[appveyor-url]: https://ci.appveyor.com/project/kanreisa/reichat-server
[dep-img]: https://david-dm.org/kanreisa/reichat-server.svg
[dep-url]: https://david-dm.org/kanreisa/reichat-server
[devdep-img]: https://david-dm.org/kanreisa/reichat-server/dev-status.svg
[devdep-url]: https://david-dm.org/kanreisa/reichat-server#info=devDependencies

---
_Source: https://npm.io/package/reichat-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
