Gathering detailed insights and metrics for nestjs-algoliasearch
Gathering detailed insights and metrics for nestjs-algoliasearch
Gathering detailed insights and metrics for nestjs-algoliasearch
Gathering detailed insights and metrics for nestjs-algoliasearch
npm install nestjs-algoliasearch
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
24 Commits
3 Forks
1 Watching
12 Branches
2 Contributors
Updated on 18 Mar 2024
TypeScript (73.59%)
JavaScript (24.65%)
Shell (1.76%)
Cumulative downloads
Total Downloads
Last day
183.3%
34
Compared to previous day
Last week
56.7%
163
Compared to previous week
Last month
-16.2%
600
Compared to previous month
Last year
-11%
4,764
Compared to previous year
3
26
Algolia search module for NestJS, using the official algoliasearch package
1npm install nestjs-algoliasearch algoliasearch
or
1yarn add nestjs-algoliasearch algoliasearch
1// app.module.ts 2import { AlgoliaModule } from 'nestjs-algoliasearch'; 3 4@Module({ 5 imports: [ 6 //... 7 AlgoliaModule.forRoot({ 8 applicationId: 'ALGOLIA_APPLICATION_ID', 9 apiKey: 'ALGOLIA_API_KEY', 10 }), 11 12 // Or async: 13 AlgoliaModule.forRootAsync({ 14 imports: [ConfigModule], 15 inject: [ConfigService], 16 useFactory: (config: ConfigService) => config.get('algolia'), 17 }), 18 //... 19 ], 20}) 21export class AppModule {}
1// todo.module.ts 2import { AlgoliaModule } from 'nestjs-algoliasearch'; 3 4@Module({ 5 imports: [ 6 TypeOrmModule.forFeature([ 7 TodoEntity, 8 ]), 9 AlgoliaModule.forFeature([{ 10 name: TodoEntity, // Or a string, this will be the index name 11 options: {/* custom Algolia client index settings */}, 12 }]) 13 ], 14}) 15export class TodoModule {}
See the official Algolia client documentatin for a list of all available Index options
The Index is injectable using the @InjectIndex
decorator, the returned value is an algoliasearch.SearchIndex
.
See the official Algolia client documentation for a list of available methods
1// todo.service.ts 2import { InjectIndex } from 'nestjs-algoliasearch'; 3import { SearchIndex } from 'algoliasearch'; 4 5@Injectable() 6export class TodoService { 7 constructor( 8 @InjectIndex(TodoEntity /* or the string used as "name" prop while registering the index */) 9 private readonly todoIndex: SearchIndex, 10 ) 11}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/14 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More