mongoose-automatic-seed
v1.0.10
Published
[![CI](https://github.com/orbe-soft/mongoose-auto-seed/actions/workflows/automated-tests.yaml/badge.svg)](https://github.com/orbe-soft/mongoose-auto-seed/actions/workflows/automated-tests.yaml)
Downloads
62
Readme
mongoose-automatic-seed
This is an util for mongoose, that you can execute and create seeders and call it programmatically.
Getting Started
yarn add mongoose-automatic-seed
After you install the package, just use in your application:
import autoSeed from "mongoose-automatic-seed";
import mySeeder from "mySeeder";
await autoSeed.startup([mySeeder]);
/** MySeeder */
import { Seeder } from "mongoose-automatic-seed";
export default class MySeeder implements Seeder {
/** Execute only one time */
unique = true;
title = "2908njk4012";
async start(): Promise<void> {
/** @todo */
}
}