@norest/plugin-faker
TypeScript icon, indicating that this package has built-in type declarations

0.3.6 • Public • Published

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 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 API methods.

Readme

Keywords

Package Sidebar

Install

npm i @norest/plugin-faker

Weekly Downloads

1

Version

0.3.6

License

MIT

Unpacked Size

373 kB

Total Files

22

Last publish

Collaborators

  • janhommes