Update index.ts
This commit is contained in:
parent
d4af74f60e
commit
430fedf594
1 changed files with 1 additions and 10 deletions
11
src/index.ts
11
src/index.ts
|
@ -99,10 +99,6 @@ const instances = JSON.parse(
|
|||
readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/instances.json").toString(),
|
||||
) as instace[];
|
||||
|
||||
const manifest = JSON.parse(
|
||||
readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/manifest.json").toString(),
|
||||
) as object;
|
||||
|
||||
const instanceNames = new Map<string, Instance>();
|
||||
|
||||
for (const instance of instances) {
|
||||
|
@ -187,11 +183,6 @@ app.use("/", async (req: Request, res: Response) => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (req.path.startsWith("/manifest.json")) {
|
||||
res.json(manifest);
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.path.startsWith("/invite/")) {
|
||||
res.sendFile(path.join(__dirname, "webpage", "invite.html"));
|
||||
return;
|
||||
|
@ -202,7 +193,7 @@ app.use("/", async (req: Request, res: Response) => {
|
|||
|
||||
app.set("trust proxy", (ip: string) => ip.startsWith("127."));
|
||||
|
||||
const PORT = process.env.PORT || Number(process.argv[2]) || 8333;
|
||||
const PORT = process.env.PORT || Number(process.argv[2]) || 8080;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server running on port ${PORT}`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue