- What is some compelling syntax as a hook?
- Why should you use this component?
- Links to Stack / other resources?
Found a bug? Feature request? File it here.
You'll need an existing Convex project to use the component. Convex is a hosted backend platform, including a database, serverless functions, and a ton more you can learn about here.
Run npm create convex
or follow any of the quickstarts to set one up.
Install the component package:
npm install @convex-dev/document-search
Create a convex.config.ts
file in your app's convex/
folder and install the component by calling use
:
// convex/convex.config.ts
import { defineApp } from "convex/server";
import documentSearch from "@convex-dev/document-search/convex.config";
const app = defineApp();
app.use(documentSearch);
export default app;
import { components } from "./_generated/api";
import { DocumentSearch } from "@convex-dev/document-search";
const documentSearch = new DocumentSearch(components.documentSearch, {
...options,
});
See more example usage in example.ts.
Run the example with npm run example
.