@expressots/adapter-express 3.0.0-beta.4.1 → 3.0.0-beta.4.2
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/lib/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [3.0.0-beta.4.2](https://github.com/expressots/adapter-express/compare/3.0.0-beta.3...3.0.0) (2024-12-03)
|
|
2
|
+
|
|
3
|
+
### Code Refactoring
|
|
4
|
+
|
|
5
|
+
- app express class with async methods ([5c9ea2b](https://github.com/expressots/adapter-express/commit/5c9ea2b6cac9fa6455d140c0d0ce052712fa8251))
|
|
6
|
+
- return http server on getHttp instead of app express ([e6646de](https://github.com/expressots/adapter-express/commit/e6646de4e76e0824f2365695fa936975553796d4))
|
|
7
|
+
- server listen accept 0 to set random port ([7a97cf1](https://github.com/expressots/adapter-express/commit/7a97cf1d769acb0b7cbcba651aea49137310aa76))
|
|
8
|
+
- update getHttpServer method to return http.Server instance ([98985e8](https://github.com/expressots/adapter-express/commit/98985e841d608c2f17a09cb88ef50462c5a3d066))
|
|
9
|
+
|
|
10
|
+
### Tests
|
|
11
|
+
|
|
12
|
+
- update tests for globalConfiguration, isDevelopment, getHttpServer, serverShutdown ([17b7d92](https://github.com/expressots/adapter-express/commit/17b7d92e87f4ad0d14a386e8351c723e1392a5c3))
|
|
13
|
+
|
|
14
|
+
## [3.0.0-beta.4.1](https://github.com/expressots/adapter-express/compare/3.0.0-beta.3...3.0.0) (2024-12-03)
|
|
15
|
+
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
- app express class with async methods ([5c9ea2b](https://github.com/expressots/adapter-express/commit/5c9ea2b6cac9fa6455d140c0d0ce052712fa8251))
|
|
19
|
+
- server listen accept 0 to set random port ([7a97cf1](https://github.com/expressots/adapter-express/commit/7a97cf1d769acb0b7cbcba651aea49137310aa76))
|
|
20
|
+
|
|
21
|
+
### Tests
|
|
22
|
+
|
|
23
|
+
- update tests for globalConfiguration, isDevelopment, getHttpServer, serverShutdown ([17b7d92](https://github.com/expressots/adapter-express/commit/17b7d92e87f4ad0d14a386e8351c723e1392a5c3))
|
|
24
|
+
|
|
1
25
|
## [3.0.0-beta.4](https://github.com/expressots/adapter-express/compare/3.0.0-beta.3...3.0.0) (2024-12-03)
|
|
2
26
|
|
|
3
27
|
### Code Refactoring
|
|
@@ -113,7 +113,7 @@ class AppExpressMicro {
|
|
|
113
113
|
* @public API
|
|
114
114
|
*/
|
|
115
115
|
getHttpServer() {
|
|
116
|
-
return this.
|
|
116
|
+
return this.httpServer;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* Create a new instance of the Express Micro API adapter
|
|
@@ -153,8 +153,8 @@ class AppExpressMicro {
|
|
|
153
153
|
this.app.use(this.Middleware.getErrorHandler());
|
|
154
154
|
}
|
|
155
155
|
return new Promise((resolve, reject) => {
|
|
156
|
-
|
|
157
|
-
const address =
|
|
156
|
+
this.httpServer = this.app.listen(normalizedPort, () => {
|
|
157
|
+
const address = this.httpServer.address();
|
|
158
158
|
if (typeof address === "object" && address?.port) {
|
|
159
159
|
this.port = address.port;
|
|
160
160
|
}
|
|
@@ -168,7 +168,7 @@ class AppExpressMicro {
|
|
|
168
168
|
});
|
|
169
169
|
resolve();
|
|
170
170
|
});
|
|
171
|
-
|
|
171
|
+
this.httpServer.on("error", (error) => {
|
|
172
172
|
logger.error(`Error starting server: ${error.message}`, "MicroAPI");
|
|
173
173
|
reject(error);
|
|
174
174
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IMiddleware, interfaces } from "@expressots/core";
|
|
2
2
|
import { Env, IConsoleMessage } from "@expressots/shared";
|
|
3
|
-
import
|
|
3
|
+
import { Server } from "http";
|
|
4
4
|
import { IIOC } from "./application-express-micro-container";
|
|
5
5
|
import { IRoute } from "./application-express-micro-route";
|
|
6
6
|
/**
|
|
@@ -38,7 +38,7 @@ export interface ICreateMicroAPI {
|
|
|
38
38
|
* @returns express.Application
|
|
39
39
|
* @public API
|
|
40
40
|
*/
|
|
41
|
-
getHttpServer():
|
|
41
|
+
getHttpServer(): Server;
|
|
42
42
|
/**
|
|
43
43
|
* Build the Web Server Micro API
|
|
44
44
|
* @returns IWebServerMicroAPI
|
package/lib/package.json
CHANGED
package/package.json
CHANGED