[feat] quick search function with typesense
This commit is contained in:
13
src/db/typesense.ts
Normal file
13
src/db/typesense.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'dotenv/config';
|
||||
import { Client } from 'typesense';
|
||||
|
||||
|
||||
export const client = new Client({
|
||||
nodes: [{
|
||||
host: process.env.TYPESENSE_HOST!,
|
||||
port: Number(process.env.TYPESENSE_PORT!),
|
||||
protocol: process.env.TYPESENSE_PROTOCOL!,
|
||||
}],
|
||||
apiKey: process.env.TYPESENSE_API_KEY!,
|
||||
connectionTimeoutSeconds: 2,
|
||||
});
|
||||
Reference in New Issue
Block a user