fix stuff after moving to resources

This commit is contained in:
sky
2025-06-30 03:19:11 -04:00
parent bc03213b0b
commit fa52034fb7
2 changed files with 4 additions and 4 deletions

View File

@ -37,8 +37,8 @@ let rawProfileHTML = fs.readFileSync("./html/profile.html").toString();
let rawEditProfileHTML = fs.readFileSync("./html/profile_edit.html").toString();
let profile404 = fs.readFileSync("./html/profile_404.html").toString();
let profileBan = fs.readFileSync("./html/profile_ban.html").toString();
let gamesJSON = JSON.parse(fs.readFileSync("./selenite/data/games.json").toString());
let appsJSON = JSON.parse(fs.readFileSync("./selenite/data/apps.json").toString());
let gamesJSON = JSON.parse(fs.readFileSync("./public/resources/games.json").toString());
let appsJSON = JSON.parse(fs.readFileSync("./public/resources/apps.json").toString());
let profileReadyJSON = {};
for (let i = 0; i < gamesJSON.length; i++) {
profileReadyJSON[gamesJSON[i].directory] = { name: gamesJSON[i].name, image: gamesJSON[i].image };

View File

@ -387,7 +387,7 @@ app.use("/ai", async (req, res, next) => {
next();
}
});
app.use("/", express.static("./selenite", { extensions: ["html"] }));
app.use("/", express.static("./public", { extensions: ["html"] }));
app.use("/data/:id/:file", async (req, res) => {
const id = path.basename(req.params.id);
const file = path.basename(req.params.file);
@ -490,6 +490,6 @@ server.on("upgrade", (request, socket, head) => {
app.use(async (req, res) => {
res
.type("text/html")
.send(await fs.readFile(`./selenite/404.html`))
.send(await fs.readFile(`./public/404.html`))
.status(404);
});