mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
26 lines
621 B
TypeScript
26 lines
621 B
TypeScript
import { createClient } from "@libsql/client/node";
|
|
import { serveFresh } from "./src/adapter/vite";
|
|
import { LibsqlConnection } from "./src/data";
|
|
import { StorageLocalAdapter } from "./src/media/storage/adapters/StorageLocalAdapter";
|
|
import { registries } from "./src/modules/registries";
|
|
|
|
registries.media.add("local", {
|
|
cls: StorageLocalAdapter,
|
|
schema: StorageLocalAdapter.prototype.getSchema()
|
|
});
|
|
|
|
const connection = new LibsqlConnection(
|
|
createClient({
|
|
url: "file:.db/show.db"
|
|
})
|
|
);
|
|
|
|
const app = await serveFresh({
|
|
app: {
|
|
connection
|
|
},
|
|
setAdminHtml: true
|
|
});
|
|
|
|
export default app;
|