* [examples/ckan][m]: rplc @flowershow with @portaljs packages * [examples/fivethirtyeight][m]: rplc @flowershow with @portaljs packages * [examples/turing][m]: rplc @flowershow with @portaljs packages * [examples/openspending][m]: rplc @flowershow with @portaljs packages * [examples/learn][m]: rplc @flowershow with @portaljs packages * [examples/github-backed-catalog][m]: rplc @flowershow with @portaljs packages * [examples/github-backed-catalog][xs] - fix build * [examples][m] - fix builds * [examples/openspending][xs] - fix build --------- Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
25 lines
527 B
TypeScript
25 lines
527 B
TypeScript
import { MarkdownDB } from "mddb";
|
|
// 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;
|