catberry-socket.io
Catberry adapter for Socket.io engine
Last updated 3 years ago by pragmader .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install catberry-socket.io 
SYNC missed versions from official npm registry.

Catberry Socket.io Adapter

Gitter

It is an adapter for Socket.io engine that makes possible to use it from Catberry application.

Installation

npm install catberry-socket.io --save

Usage

You can use the adapter in ./server.js as following:

const cat = catberry.create(config);
const server = http.createServer(app);

const socketIo = require('catberry-socket.io');
socketIo.register(cat.locator);
cat.locator.resolve('socket.ioProvider').registerServer(server);

server.listen(config.server.port);

In ./browser.js as following:

const cat = catberry.create(config);

const socketIo = require('catberry-socket.io');
socketIo.register(cat.locator);
cat.locator.resolve('socket.ioProvider').connectToServer();

In ./build.js as following:

const cat = catberry.create(config);

const socketIo = require('catberry-socket.io');
socketIo.register(cat.locator);

In fact, Catberry CLI does it for you.

Contributing

There are a lot of ways to contribute:

Miha VizoviĆĄek miha.vizovisek@gmail.com

Denis Rechkunov denis.rechkunov@gmail.com

Current Tags

  • 1.1.1                                ...           latest (3 years ago)

3 Versions

  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 3
Last Day 3
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |