@ccci/micro-server 1.0.21 → 1.0.23
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/dist/index.js +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -87654,13 +87654,11 @@ import fs3 from "node:fs";
|
|
|
87654
87654
|
import path2 from "node:path";
|
|
87655
87655
|
class WebSocketServer {
|
|
87656
87656
|
constructor(port = 5001, dir, folder = "sockets") {
|
|
87657
|
-
console.log("dir :>> ", dir);
|
|
87658
87657
|
let handlers = [];
|
|
87659
87658
|
let fullDir = path2.join(dir, folder);
|
|
87660
|
-
console.log("fullDir :>> ", fullDir);
|
|
87661
87659
|
fs3.readdirSync(fullDir).forEach((file) => {
|
|
87662
87660
|
if (file.toLowerCase().indexOf(".ts")) {
|
|
87663
|
-
let filePath = path2.join(
|
|
87661
|
+
let filePath = path2.join(fullDir, file);
|
|
87664
87662
|
import(filePath).then((handlerClass) => {
|
|
87665
87663
|
let path3 = file.replace(".ts", "");
|
|
87666
87664
|
let handler = new handlerClass.default;
|