Skip to content

Commit

Permalink
bugs fixed!
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwaves-ofc committed Jan 2, 2024
1 parent dd63c48 commit 85cd2f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

import App from "./src/structures/App";
import App from "./structures/App";
import colors from "colors";
import os from "os";
import readline from "readline";
Expand All @@ -15,7 +15,7 @@ process.on("unhandledRejection", (reason: any, p: any) => {

process.on("uncaughtException", (err: Error, origin: string) => {
console.log(
"\n\n\n\n\n\n=== uncaught Exception ===".toUpperCase().yellow.dim,
"\n\n\n\n\n\n=== uncaught Exception ===".toUpperCase().yellow.dim
);
console.log("Exception: ", err.stack ? err.stack : err);
console.log("=== uncaught Exception ===\n\n\n\n\n".toUpperCase().yellow.dim);
Expand All @@ -41,17 +41,17 @@ process.on(
"multipleResolves",
(type: string, promise: Promise<any>, reason: any) => {
// Do something for multipleResolves event
},
}
);

function getIPv4Addresses(): string | undefined {
const networkInterfaces = os.networkInterfaces();
let ipv4Address: string | undefined;

Object.keys(networkInterfaces).forEach((interfaceName) => {
const interfaceInfo = networkInterfaces[interfaceName];
const interfaceInfo: any = networkInterfaces[interfaceName];

interfaceInfo.forEach((info) => {
interfaceInfo.forEach((info:any) => {
if (info.family === "IPv4" && info.internal === false) {
ipv4Address = info.address;
}
Expand Down Expand Up @@ -80,8 +80,8 @@ new Promise<void>((resolve) => {
value === "All"
? `${value}`
: `${value}:${client.config.website.port}`
}`,
),
}`
)
);
});
console.log(colors.yellow.bold(`Or just press enter to go with env ips \n`));
Expand All @@ -103,7 +103,7 @@ new Promise<void>((resolve) => {
}
}

const allips = client.config.website.links.map((val) => {
const allips = client.config.website.links.map((val:any) => {
return (val = `${val}:${client.config.website.port}`);
});

Expand Down
6 changes: 3 additions & 3 deletions src/structures/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Logger from "../utils/logger";
// import { CompressionTypes, Partitioners } from "kafkajs";

class App {
private config: any;
config: any;
private express: any;
private routes: Map<string, any>;
private logger: any;
Expand All @@ -37,7 +37,7 @@ class App {
private set: any;
private _router: any;
private findUser: any;
private connect: any;
connect: any;

constructor() {
// super();
Expand Down Expand Up @@ -223,4 +223,4 @@ class App {
}
}

export = App;
export default App;

0 comments on commit 85cd2f4

Please sign in to comment.