@azteam/express 1.2.133 → 1.2.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/{ApiServer.js → Server.js} +12 -3
- package/src/index.js +4 -6
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ function omitItem(item, guard, allows) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class Server {
|
|
42
42
|
constructor(currentDir = '', options = {}) {
|
|
43
43
|
this.options = options;
|
|
44
44
|
|
|
@@ -341,7 +341,16 @@ class ApiServer {
|
|
|
341
341
|
return server;
|
|
342
342
|
|
|
343
343
|
} else {
|
|
344
|
-
throw Error('No controllers in use');
|
|
344
|
+
throw Error('No controllers in use API');
|
|
345
|
+
}
|
|
346
|
+
return this;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
startSocket(port) {
|
|
350
|
+
if (!_.isEmpty(this.controllers)) {
|
|
351
|
+
|
|
352
|
+
} else {
|
|
353
|
+
throw Error('No controllers in use SOCKET');
|
|
345
354
|
}
|
|
346
355
|
return this;
|
|
347
356
|
}
|
|
@@ -360,4 +369,4 @@ class ApiServer {
|
|
|
360
369
|
}
|
|
361
370
|
}
|
|
362
371
|
|
|
363
|
-
export default
|
|
372
|
+
export default Server;
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import SocketServer from './SocketServer';
|
|
1
|
+
import Server from './Server';
|
|
3
2
|
|
|
4
3
|
import Controller from './Controller';
|
|
5
4
|
import AdminController from './AdminController';
|
|
@@ -10,9 +9,8 @@ export * from './constant';
|
|
|
10
9
|
export * from './validate';
|
|
11
10
|
|
|
12
11
|
export {
|
|
13
|
-
ApiServer,
|
|
14
|
-
SocketServer,
|
|
15
|
-
|
|
16
12
|
Controller,
|
|
17
13
|
AdminController,
|
|
18
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default Server;
|