Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"debug": "^2.2.0",
"feathers-socket-commons": "^2.0.0",
"primus": "^5.0.1",
"primus": "^6.0.5",
"primus-emitter": "^3.1.1",
"uberproto": "^1.2.0"
},
Expand All @@ -75,6 +75,7 @@
"mocha": "^3.0.0",
"rimraf": "^2.5.4",
"semistandard": "^9.1.0",
"ws": "^1.0.0"
"uws": "^0.11.1",
"ws": "^1.1.1"
}
}
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default function (config, configurer) {
if (!primus) {
primus = this.primus = new Primus(server, config);

primus.use('emitter', Emitter);
primus.plugin('emitter', Emitter);

primus.before('feathers', function (req, res, next) {
primus.use('feathers', function (req, res, next) {
req.feathers = { provider: 'primus' };
next();
}, 0);
Expand Down
2 changes: 1 addition & 1 deletion test/client/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function (cb) {

var app = feathers()
.configure(primus({
transformer: 'websockets'
transformer: 'uws'
}, cb))
.use('/todos', todoService);

Expand Down
6 changes: 3 additions & 3 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('feathers-primus', () => {
const app = options.app = feathers()
.configure(hooks())
.configure(primus({
transformer: 'websockets'
transformer: 'uws'
}, function (primus) {
options.socket = new primus.Socket('http://localhost:7888');

Expand Down Expand Up @@ -61,7 +61,7 @@ describe('feathers-primus', () => {
var counter = 0;
var app = feathers()
.configure(primus({
transformer: 'websockets'
transformer: 'uws'
}, function () {
assert.equal(counter, 0);
counter++;
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('feathers-primus', () => {
let server;
const sub = feathers()
.configure(primus({
transformer: 'websockets'
transformer: 'uws'
}, function (primus) {
const socket = new primus.Socket('http://localhost:9876');

Expand Down
2 changes: 1 addition & 1 deletion test/sub-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function todoService () {

export default function (callback) {
const options = {
transformer: 'websockets'
transformer: 'uws'
};
const app = feathers().configure(primus(options, primus => callback(primus)));
const v1 = feathers().configure(primus(options)).use('/todos', todoService());
Expand Down