A progressive Node.js framework for building efficient and scalable server-side applications.
A dynamic module for configuring Airtable in a Nest framework TypeScript project.
npm install nestjs-airtable
The Airtable Module exposes two static methods to configure the Airtable client: forRoot()
and forRootAsync()
.
import { Module } from '@nestjs/common'
import { ConfigModule, ConfigService } from '@nestjs/config'
import { AirtableModule } from 'nestjs-airtable'
@Module({
imports: [
AirtableModule.forRoot({
apiKey: 'someSecretApiKey',
}),
],
})
export class MyModule {}
import { Module } from '@nestjs/common'
import { ConfigModule, ConfigService } from '@nestjs/config'
import { AirtableModule } from 'nestjs-airtable'
@Module({
imports: [
AirtableModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
apiKey: configService.getOrThrow('AIRTABLE_API_KEY'),
}),
}),
],
})
export class MyModule {}
Feel free to fork the repo and open a pull-request to contribute to the project directly, or submit an issue if you find a bug.