Skip to content

clout-js-modules/clout-socket-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clout-socket-io NPM version Build Status

Install

In the directory of your clout-js application, do the following;

  1. Install this package
npm install clout-socket-io
  1. Add this module to package.json or clout.json
{
    ...
    "modules": ["clout-socket-io"]
    ...
}

Usage

This module inject socket.io into clout and makes use of the express session. e.g.

var clout = require('clout-js'),
    sio = clout.sio;

sio.sockets.on("connection", function(socket) {
  socket.request.session // Express session is also available in Sockets!
  socket.logger // Clout logger are also exposed!
  socket.models // Clout models are here too!
});

Releases

No releases published

Packages

No packages published