0.0.2 • Published 9 months ago

nestjs-contentful v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

nestjs-contentful

Usage:

  • find out what your contentful space id is:
    • log in or sign in on contenful on here
    • find your space id in the url: https://app.contentful.com/spaces/{this-is-your-space}/home
  • create a content management token:
    • settings
    • API Keys
    • Content management tokens
    • Generate personal token
  • add the following to your app.module.ts:
import { Module } from '@nestjs/common'
import { ContentfulModule } from 'nestjs-contentful'

@Module({
  imports: [
    // somewhere between your other imports..
    ContentfulModule.forRoot({
      token: 'CFPAT-your-contentful-token', // example, don't commit this!
      space: 'your-contentful-space', // find this value in your url
      environment: 'some-environment', // optional, defaults to `master`
    }),
  ],
  controllers: [
    // your controllers..
  ],
  providers: [
    // your providers..
  ],
})
export class AppModule {}

You should probably use @nestjs/config with a custom provider or similar to securely handle your credentials

0.0.2

9 months ago

0.0.1

9 months ago