Remove process.cwd() as root folder
Opened this issue · 2 comments
lazuee commented
Why there's a need to add process.cwd()
? Give us the freedom to use absolute path...
https://github.com/jakobbouchard/serve-static-bun/blob/7ed89cd0d142844f73ac158b0fcb351553cc89dc/src/serve-static.ts#L236C1-L236C36
I can't do like this because of that process.cwd()
as root prefix..
import path from "path";
import Bao from "baojs";
import serveStatic from "serve-static-bun";
const app = new Bao();
const staticFolder = path.join(import.meta.dir, "..", "/public");
app.get("/gamefiles/*any", serveStatic(staticFolder, { middlewareMode: "bao", stripFromPathname: "/gamefiles" }));
jakobbouchard commented
Hello! 👋 I no longer work in web development, and do not have a lot of free time or interest in maintaining this package anymore. I am closing all issues and PR for it and will archive the repository, but if anybody is interested in maintaining it, I am willing to transfer the repository and NPM package. I'm sorry that I didn't have time to review your PR.