mirror of
https://github.com/sp-tarkov/db-website.git
synced 2025-02-02 17:49:21 -05:00
Fixed not being able to serve react app
This commit is contained in:
parent
79e4169658
commit
79fda074fb
@ -15,8 +15,6 @@ export class CacheController {
|
|||||||
const items = CacheService.getCache("items");
|
const items = CacheService.getCache("items");
|
||||||
const locales = CacheService.getCache("locales");
|
const locales = CacheService.getCache("locales");
|
||||||
|
|
||||||
console.log(items, locales);
|
|
||||||
|
|
||||||
const searchInput = query.toLowerCase().trim();
|
const searchInput = query.toLowerCase().trim();
|
||||||
const locale = locales[localeId];
|
const locale = locales[localeId];
|
||||||
|
|
||||||
|
@ -18,10 +18,11 @@ new Elysia()
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.use(cors({ allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept" }))
|
.use(cors({ allowedHeaders: "Origin, X-Requested-With, Content-Type, Accept" }))
|
||||||
.use(staticPlugin({ prefix: "/", alwaysStatic: true }))
|
.use(staticPlugin({ prefix: "/", indexHTML: true }))
|
||||||
.use(Logestic.preset("fancy"))
|
.use(Logestic.preset("fancy"))
|
||||||
.use(api)
|
.use(api)
|
||||||
.get("*", () => Bun.file("public/index.html"))
|
.get("/search", () => Bun.file("public/index.html"))
|
||||||
|
.get("/search/*", () => Bun.file("public/index.html"))
|
||||||
.listen(3000, (server) => {
|
.listen(3000, (server) => {
|
||||||
console.log(`Server is running at ${server.hostname}:${server.port}`);
|
console.log(`Server is running at ${server.hostname}:${server.port}`);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user