Aida

Aida

  • Docs
  • Reference
  • Contributors

›Getting Started

Getting Started

  • Introduction
  • Installation
  • Creating Your First Model
  • Enriching Your Model
  • Introduction to Injectors
  • Introduction to Consumers

Advanced Usage

  • Introduction to Endpoints
  • Chaining Injectors
  • Putting It All Together

Extending Aida

  • Creating A Custom Injector

Reference

  • Defined Types
  • Data Model
  • Endpoints Model
  • Existing Injectors
  • Existing Consumers
  • Aida Config
  • Faked Data

Introduction to Consumers

Consumers can really be anything you wish, so they are not necessarily part of Aida. The reason some of them are kept as part of the Aida monorepo is purely for convenience. Consumers that are non-trivial and generic enough will be included as part of Aida's packages, so other users can also benefit from them. You can find all existing consumers here.

Let's see an example of how we can use the data generated by the faked-model injector. In our case, we want to insert the fake data in our development database instead of manually inserting data. Once we have the data with the right schema, it is pretty trivial to do it, and it can be done in one line:

mongoimport --jsonArray --db test --collection user --file faked-model.json

This is a simple example of how trivial it can be to generate fake data for your database and populate it for development and testing. You can, of course, have more complicated workflows and logic on how the results from injectors will be used, but that is entirely up to your use-case.

So far we have seen how to define our data model, enrich it with some additional properties, and use an injector to generate something useful out of it. There are many more advanced usages Aida can be used for, so let's start with a special modeling type called endpoints in the next section.

← Introduction to InjectorsIntroduction to Endpoints →
Aida
Docs
Getting StartedReference
Community
Project Chat
More
GitHubStar
Copyright © 2018 Stevche Radevski