mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-09 22:20:48 +01:00
Merge branch 'master' into v0.4.x
This commit is contained in:
16
src/socket.io/plugins.js
Normal file
16
src/socket.io/plugins.js
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
var SocketPlugins = {};
|
||||
|
||||
/*
|
||||
This file is provided exclusively so that plugins can require it and add their own socket listeners.
|
||||
|
||||
How? From your plugin:
|
||||
|
||||
var SocketPlugins = module.parent.require('./socket.io/plugins');
|
||||
SocketPlugins.myPlugin.myMethod = function() { ... };
|
||||
|
||||
Be a good lad and namespace your methods.
|
||||
*/
|
||||
|
||||
module.exports = SocketPlugins;
|
||||
Reference in New Issue
Block a user