Bun template has this config:
import { type BunBkndConfig, serve } from "bknd/adapter/bun";
// Actually, all it takes is the following line:
// serve();
// this is optional, if omitted, it uses an in-memory database
const config: BunBkndConfig = {
connection: {
url: "file:data.db",
},
config: {
media: {
enabled: true,
adapter: {
type: "local",
config: { path: "./uploads" },
},
},
},
};
serve(config);
where the file:data.db on Windows produce a file file:
The fix is to remove the file: prefix but ideally templates should "just work" and not require patching after initialization.
I see two paths forward:
- Remove
file: prefix entirely
- Handle the prefix based on the operating system
Steps to reproduce
- Run
bunx bknd create & select bun runtime template
- cd into the newly created project folder
- Run
bun run dev
- See the file get created (if not existed)
Bun template has this config:
where the
file:data.dbon Windows produce afilefile:The fix is to remove the
file:prefix but ideally templates should "just work" and not require patching after initialization.I see two paths forward:
file:prefix entirelySteps to reproduce
bunx bknd create& select bun runtime templatebun run dev