Skip to content

Commit

Permalink
1760002018-v2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
CE1CECL committed Mar 31, 2024
1 parent 25a76bf commit dd43535
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/api/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ export class FosscordServer extends Server {
fs.writeFileSync(
"./tmp/HOST",
place.split("://")[1]?.split(":")[0]?.split("/")[0] +
":" +
"443" ||
process.env.HOSTNAME + ":" + process.env.PORT ||
"localhost:3001",
"/spacebar" ||
process.env.HOSTNAME +
":" +
process.env.PORT +
"/spacebar" ||
"localhost" + "/spacebar",
);
fs.writeFileSync(
"./tmp/PORT",
Expand All @@ -128,13 +130,12 @@ export class FosscordServer extends Server {
fs.writeFileSync(
"./tmp/HOST",
place.split("://")[1]?.split(":")[0]?.split("/")[0] +
":" +
"80" ||
"/spacebar" ||
process.env.HOSTNAME +
":" +
process.env.PORT +
"/spacebar" ||
"localhost:3001" + "/spacebar",
"localhost" + "/spacebar",
);
fs.writeFileSync(
"./tmp/PORT",
Expand All @@ -151,7 +152,8 @@ export class FosscordServer extends Server {
"./tmp/HOST",
place.split("://")[1]?.split(":")[0]?.split("/")[0] +
":" +
place.split("://")[1]?.split(":")[1]?.split("/")[0] ||
place.split("://")[1]?.split(":")[1]?.split("/")[0] +
"/spacebar" ||
process.env.HOSTNAME +
":" +
process.env.PORT +
Expand Down Expand Up @@ -182,12 +184,6 @@ export class FosscordServer extends Server {
},
);

fs.writeFileSync(
"./tmp/HOST",
fs.readFileSync("./tmp/HOST", { encoding: "utf8" }) +
"/spacebar",
);

next();
});

Expand Down

0 comments on commit dd43535

Please sign in to comment.