koa-websocket
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -11,4 +11,4 @@ "use strict"; | ||
app.ws.use(route.all('/test/:id', function* (next) { | ||
// `this` is the socket passed from WebSocketServer to connection listeners | ||
this.send('Hello World'); | ||
// `this` is the socket passed from WebSocketServer to connection listeners | ||
this.on('message', function(message) { | ||
@@ -15,0 +15,0 @@ // do something with the message from client |
{ | ||
"name": "koa-websocket", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Light wrapper around Koa providing a websocket middleware handler that is koa-route compatible.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha" | ||
"test": "./node_modules/.bin/mocha $NODE_FLAGS test/test.js" | ||
}, | ||
@@ -35,4 +35,4 @@ "keywords": [ | ||
"koa-route": "^2.4.0", | ||
"mocha": "^2.2.0" | ||
"mocha": "~2.1.0" | ||
} | ||
} |
# koa-websocket | ||
[![Build Status](https://travis-ci.org/kudos/koa-websocket.svg?branch=master)](https://travis-ci.org/kudos/koa-websocket) | ||
## Installation | ||
@@ -14,3 +14,3 @@ | ||
route = require('koa-route'), | ||
websockify = require('../'); | ||
websockify = require('koa-websocket'); | ||
@@ -17,0 +17,0 @@ const app = websockify(koa()); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4805
8