# nestjs-contentful

> ## Usage:

Latest version **0.0.2** (published 2023-08-17) · 0 weekly downloads

## Install

```sh
npm install nestjs-contentful
pnpm add nestjs-contentful
yarn add nestjs-contentful
bun add nestjs-contentful
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-08-17 |
| First published | 2023-08-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Niels Mokkenstorm |
| Maintainers | wonderlandzor |

## Links

- npm: https://www.npmjs.com/package/nestjs-contentful
- npm.io page: https://npm.io/package/nestjs-contentful

## Dependencies (3)

- [rxjs](https://npm.io/package/rxjs.md) ^7.8.1
- [@nestjs/axios](https://npm.io/package/@nestjs/axios.md) ^3.0.0
- [@nestjs/common](https://npm.io/package/@nestjs/common.md) ^10.1.3

## Recent versions

- 0.0.2 (latest) — 2023-08-17
- 0.0.1 — 2023-08-17

## README

# nestjs-contentful

## Usage:

- find out what your contentful space id is:
  - log in or sign in on contenful on [here](https://contentful.com/login)
  - 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`:

```typescript
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](https://docs.nestjs.com/techniques/configuration) with a [custom provider](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory) or similar to securely handle your credentials

---
_Source: https://npm.io/package/nestjs-contentful · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
