@azteam/express 1.2.132 → 1.2.135
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} +4 -4
- 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
|
|
|
@@ -117,7 +117,7 @@ class ApiServer {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
startAPIServer(port) {
|
|
121
121
|
if (!_.isEmpty(this.controllers)) {
|
|
122
122
|
|
|
123
123
|
const WHITE_LIST = this.whiteList;
|
|
@@ -343,7 +343,7 @@ class ApiServer {
|
|
|
343
343
|
} else {
|
|
344
344
|
throw Error('No controllers in use');
|
|
345
345
|
}
|
|
346
|
-
return
|
|
346
|
+
return this;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
setAlertCallback(callback) {
|
|
@@ -360,4 +360,4 @@ class ApiServer {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
export default
|
|
363
|
+
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;
|