# @norest/plugin-faker

> A plugin to create faked data for the file connector.

Latest version **0.3.6** (published 2021-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @norest/plugin-faker
pnpm add @norest/plugin-faker
yarn add @norest/plugin-faker
bun add @norest/plugin-faker
```

## 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.3.6 |
| Published | 2021-08-18 |
| First published | 2021-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 364.7 KB |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| Author | Jan Hommes |
| Maintainers | janhommes |
| Keywords | noREST, plugin |

## Links

- npm: https://www.npmjs.com/package/@norest/plugin-faker
- npm.io page: https://npm.io/package/@norest/plugin-faker

## Dependencies (6)

- [faker](https://npm.io/package/faker.md) ^5.5.3
- [mongodb](https://npm.io/package/mongodb.md) ^3.6.6
- [@nestjs/core](https://npm.io/package/@nestjs/core.md) ^7.0.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [@nestjs/common](https://npm.io/package/@nestjs/common.md) ^7.0.0
- [@norest/nestjs](https://npm.io/package/@norest/nestjs.md) ^0.3.0

## Recent versions

- 0.3.6 (latest) — 2021-08-18
- 0.3.5 — 2021-08-18
- 0.3.3 — 2021-05-18

## README

### Faker plugin
A plugin to generate fake data.

## Install
Add it to your `norest.config.js` file:
``` 
const FakerModule = require('@norest/plugin-faker').FakerModule;

module.exports = {
  plugins: [FakerModule.register()]
};
```

## Usage
`POST` a [FakeDefinition](fake-definition.class.ts) to the `/faker/fake` endpoint:

```
POST http://localhost:3030/faker/fake
{
	"collection": "nr-fake-test",
  "namespace": "hacker",
  "amount": 20
}
``` 

To add more fake data, `PUT` to `/faker/fake` endpoint:

```
PUT http://localhost:3030/faker/fake
{
	"collection": "nr-fake-test",
  "namespace": "animal",
  "amount": 10
}
```

As namespaces can be used any of the [faker.js](https://github.com/marak/Faker.js/) API methods.

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