It is an adapter for Socket.io engine that makes possible to use it from Catberry application.
npm install catberry-socket.io --save
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.
There are a lot of ways to contribute:
- Give it a star
- Join the Gitter room and leave a feedback or help with answering users' questions
- Submit a bug or a feature request
- Submit a PR
Miha Vizovišek [email protected]
Denis Rechkunov [email protected]