# qufox

> Qufox - Web messaging server

Latest version **0.2.5** (published 2015-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install qufox
pnpm add qufox
yarn add qufox
bun add qufox
```

Provides the command `qufox`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2015-12-14 |
| First published | 2015-07-31 |
| 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 | talsu |
| Maintainers | talsu |
| Keywords | chat, server, messenger, messaging |

## Links

- npm: https://www.npmjs.com/package/qufox
- Repository: https://github.com/talsu/qufox
- Issues: https://github.com/talsu/qufox/issues
- npm.io page: https://npm.io/package/qufox

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [ioredis](https://npm.io/package/ioredis.md) ^1.13.0
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [socket.io](https://npm.io/package/socket.io.md) ^1.3.7
- [socket.io-ioredis](https://npm.io/package/socket.io-ioredis.md) ^1.0.1

## Recent versions

- 0.2.5 (latest) — 2015-12-14
- 0.2.4 — 2015-12-09
- 0.2.3 — 2015-11-22
- 0.2.2 — 2015-10-16
- 0.2.1 — 2015-10-15
- 0.2.0 — 2015-10-15
- 0.1.3 — 2015-08-21
- 0.1.2 — 2015-08-17
- 0.1.1 — 2015-08-17
- 0.1.0 — 2015-07-31

## README

Qufox
========

[![npm version](https://badge.fury.io/js/qufox.svg)](https://badge.fury.io/js/qufox)

node.js smiple web messaging server.

service is running at http://qufox.com and https://talk.talsu.net

## Installation

```bash
$ [sudo] npm install qufox -g
```


## Usage

### Execute server on command line
```
Usage : qufox -p [num] -r [url] -i [num]  -s -w -o

Options:
  -p, --port        listen port
  -r, --redisurl    redis server url (when use multiple nodes)
  -w, --websocket   use websocket protocol
```
#### Set config file (config.json)
```json
{
	"servicePort" : "4000",
	"websocket" : true
}
```
Unsing multiple nodes. (need redis server)
```json
{
	"servicePort" : "4000",
	"redisUrl" : "redis://localhost:6379",
	"websocket" : true
}
```
#### Example
##### Server side
```bash
$ qufox --port 4000
```
Service is running at http://localhost:4000
##### Client side
```html
<script src="./bower_components/socket.io-client/socket.io.js"></script>
<script src="./javascripts/qufox-client.js"></script>
<script>
	var client = Qufox('http://localhost:4000');

	client.join('sessionName', function (message) {
	  alert(message);
	});

	client.send('sessionName', 'hello world');
</script>
```
Alert popup appears on the first page when you open two same pages.

### Module
```javascript
var QufoxServer = require('qufox');

new QufoxServer(4000);
```
or
```javascript
new QufoxServer({
	listenTarget: 4000,
	socketOption: {transports:['websocket', 'polling']},
	redisUrl: "redis://localhost:6379"
});
```

Service is running at http://localhost:4000

## Client

qufox client code is in [qufox-client](https://github.com/talsu/qufox-client).

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