nestjs-airtable
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

A dynamic module for configuring Airtable in a Nest framework TypeScript project.

Installation

npm install nestjs-airtable

Getting Started

The Airtable Module exposes two static methods to configure the Airtable client: forRoot() and forRootAsync().

Configuration

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 {}

Async Configuration

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 {}

Contribute

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.

Package Sidebar

Install

npm i nestjs-airtable

Weekly Downloads

2

Version

0.0.1

License

UNLICENSED

Unpacked Size

100 kB

Total Files

15

Last publish

Collaborators

  • frankylee