[examples/openspending] - openspending v0.2 (#907)
* [examples/openspending] - openspending v0.2 * [examples/openspending][m] - fix build * [examples/openspending][xs] - fix build * [examples/openspending][xs] - add prebuild step * [examples/openspending][m] - fix requested by demenech * [examples/openspending][sm] - remove links + fix bug
This commit is contained in:
24
examples/openspending/lib/mddb.ts
Normal file
24
examples/openspending/lib/mddb.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { MarkdownDB } from "@flowershow/markdowndb";
|
||||
// import config from "./markdowndb.config.js";
|
||||
|
||||
// TODO get this path from markdowndb.config.js or something
|
||||
const dbPath = "markdown.db";
|
||||
//
|
||||
// if (!config.dbPath)
|
||||
// throw new Error("Invalid/Missing path in markdowndb.config.js");
|
||||
// }
|
||||
//
|
||||
// const dbPath = config.dbPath;
|
||||
// OR
|
||||
// const dbOptions = config.dbOptions;
|
||||
|
||||
const client = new MarkdownDB({
|
||||
client: "sqlite3",
|
||||
connection: {
|
||||
filename: dbPath,
|
||||
},
|
||||
});
|
||||
|
||||
const clientPromise = client.init();
|
||||
|
||||
export default clientPromise;
|
||||
Reference in New Issue
Block a user