diff --git a/src/Server.ts b/src/Server.ts
index 94aab0f5..a1b51d21 100644
--- a/src/Server.ts
+++ b/src/Server.ts
@@ -1,5 +1,5 @@
import "missing-native-js-functions";
-import fs from "fs/promises";
+import fs from "fs";
import { Connection } from "mongoose";
import { Server, ServerOptions } from "lambert-server";
import { Authentication, CORS } from "./middlewares/";
@@ -70,8 +70,8 @@ export class FosscordServer extends Server {
this.app.use(CORS);
this.app.use(Authentication);
this.app.use(BodyParser({ inflate: true, limit: 1024 * 1024 * 2 }));
- const languages = await fs.readdir(path.join(__dirname, "..", "locales"));
- const namespaces = await fs.readdir(path.join(__dirname, "..", "locales", "en"));
+ const languages = fs.readdirSync(path.join(__dirname, "..", "locales"));
+ const namespaces = fs.readdirSync(path.join(__dirname, "..", "locales", "en"));
const ns = namespaces.filter((x) => x.endsWith(".json")).map((x) => x.slice(0, x.length - 5));
await i18next
@@ -105,7 +105,7 @@ export class FosscordServer extends Server {
app.use("/api/v9", prefix);
this.app = app;
this.app.use(ErrorHandler);
- const indexHTML = await fs.readFile(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" });
+ const indexHTML = fs.readFileSync(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" });
this.app.use("/assets", express.static(path.join(__dirname, "..", "assets")));
|