1 | ;
|
2 |
|
3 | var router = require("./router.js");
|
4 |
|
5 | exports.adapters = {
|
6 | http: require("./transport/http/httpAdapter.js"),
|
7 | ws: require("./transport/ws/wsAdapter.js")
|
8 | };
|
9 |
|
10 | exports.router = function() {
|
11 | return router;
|
12 | };
|
13 |
|
14 | exports.use = function (plugin, config) {
|
15 | this._plugins = this._plugins || [];
|
16 |
|
17 | if (this._plugins.indexOf(plugin) === -1) {
|
18 | plugin(this, config);
|
19 | this._plugins.push(plugin);
|
20 | }
|
21 |
|
22 | return this;
|
23 | };
|