Skip to content

Instantly share code, notes, and snippets.

@mikermcneil
Created February 10, 2014 06:02
Show Gist options
  • Save mikermcneil/8911041 to your computer and use it in GitHub Desktop.
Save mikermcneil/8911041 to your computer and use it in GitHub Desktop.
// To disable socket.io, disable the sockets hook (you'll have to disable the pubsub hook as well)
// This is a replacement for the default app.js file:
require('sails').lift({
hooks: {
sockets: false,
pubsub: false
}
}, function doneLifting (err) { if (err) throw err; });
@alexisbrtl
Copy link

Same problem as rishabhmhjn, I tried setting in .sailsrc file:

"hook":{
    "pubsub":false,
    "sockets":false
}

But the sails.sockets and sails.io objects are still working.

@jacqueslareau
Copy link

For others coming here, on windows, npm installs sails-hook-socket in the top director now. So it's disabled in sails config, but reloaded again when checking for user hooks to load. See balderdashy/sails#3317

@ultrasaurus
Copy link

FYI: you need to also remove client-side javascript for sockets, see: balderdashy/sails#3580 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment