Socket
Book a DemoInstallSign in
Socket

clout-socket-io

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clout-socket-io

Clout module to leverage socket.io

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
9
80%
Maintainers
1
Weekly downloads
 
Created
Source

clout-socket-io NPM version Build Status

Install

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

  • Install this package
npm install clout-socket-io
  • 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!
});

Keywords

clout

FAQs

Package last updated on 10 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts