mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
21 lines
470 B
JavaScript
21 lines
470 B
JavaScript
import { serve } from "bknd/adapter/node";
|
|
|
|
// this is optional, if omitted, it uses an in-memory database
|
|
/** @type {import("bknd").CreateAppConfig} */
|
|
const config = {
|
|
connection: {
|
|
type: "libsql",
|
|
config: {
|
|
url: "http://localhost:8080"
|
|
}
|
|
}
|
|
};
|
|
|
|
serve(config, {
|
|
relativeDistPath: "../../node_modules/bknd/dist",
|
|
port: 1337,
|
|
listener: ({ port }) => {
|
|
console.log(`Server is running on http://localhost:${port}`);
|
|
}
|
|
});
|