Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Connect middleware for Cube events
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

Connect Cube Emitter

Emits Cube events for each response sent back by the server.

Install

npm install connect-cube-emitter

Usage

Express server:

var express = require('express');
var emitter = require('connect-cube-emitter');
var app = express();

app.use(emitter());

app.get('/', function(req, res){
  res.send('hello world');
});

app.listen(3000);

Options

Cube collector address (default: 'ws://127.0.0.1:1080')

app.use(emitter({ collector: 'udp://127.0.0.1:1180' }));

Event type (default: request)

app.use(emitter({ type: 'express_request' }));
Something went wrong with that request. Please try again.