I’m just testing Elysia app on Bun runtime. There’s a static image /public/1.jpg. The “public” directory is on the project root. However I cannot access this public asset via domain.com/1.jpg. It gives NOT_FOUND message. However this works without issues on local machine and on VPS server. What could be the issue?
index.ts
export default new Elysia().use(staticPlugin({ assets: './public', prefix: '/' })).get("/", () => "Hello Elysia");
I also tried without staticPlugin;
export default new Elysia().get("/", () => "Hello Elysia");
and
export default new Elysia().use(staticPlugin()).get("/", () => "Hello Elysia");
copied the public folder inside src, still not working. Vercel’s Framework Preset has identified the app as an Elysia, so I didn’t use any build commands.