createMongoStorage
function createMongoStorage(options): MongoLinksStorage;Defined in: src/storage/mongodb.ts:59
Create a MongoDB-backed MongoLinksStorage.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
MongoStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createMongoStorage } from "@xtandard/links/storage/mongodb";
const storage = createMongoStorage({ url: "mongodb://localhost:27017", dbName: "myapp", collectionName: "links_kv",});