@webtypen/webframez-core 0.0.25 → 0.0.27
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/WebApplication.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import http from "http";
|
|
1
3
|
export declare class WebApplication {
|
|
2
4
|
private server;
|
|
3
5
|
/**
|
|
4
6
|
* Init the routes and start the http-server
|
|
5
7
|
*/
|
|
6
|
-
boot(options?: any):
|
|
8
|
+
boot(options?: any): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
7
9
|
}
|
package/lib/WebApplication.js
CHANGED
|
@@ -25,14 +25,15 @@ class WebApplication {
|
|
|
25
25
|
this.server = http_1.default
|
|
26
26
|
.createServer((req, res) => {
|
|
27
27
|
Router_1.Router.handleRequest(req, res);
|
|
28
|
-
})
|
|
29
|
-
|
|
28
|
+
});
|
|
29
|
+
this.server.listen(port, () => {
|
|
30
30
|
console.log("Server started and listening on port " +
|
|
31
31
|
port +
|
|
32
32
|
(options && options.basename
|
|
33
33
|
? " (Basename: " + options && options.basename + ")"
|
|
34
34
|
: ""));
|
|
35
35
|
});
|
|
36
|
+
return this.server;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
exports.WebApplication = WebApplication;
|
package/package.json
CHANGED
package/src/WebApplication.ts
CHANGED
|
@@ -24,8 +24,9 @@ export class WebApplication {
|
|
|
24
24
|
this.server = http
|
|
25
25
|
.createServer((req, res) => {
|
|
26
26
|
Router.handleRequest(req, res);
|
|
27
|
-
})
|
|
28
|
-
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
this.server.listen(port, () => {
|
|
29
30
|
console.log(
|
|
30
31
|
"Server started and listening on port " +
|
|
31
32
|
port +
|
|
@@ -34,5 +35,6 @@ export class WebApplication {
|
|
|
34
35
|
: "")
|
|
35
36
|
);
|
|
36
37
|
});
|
|
38
|
+
return this.server;
|
|
37
39
|
}
|
|
38
40
|
}
|