UNPKG

mongoose-data-seed

Version:

Seed mongodb with data using mongoose models

27 lines (21 loc) 567 B
import '@babel/register'; import 'core-js/stable'; import 'regenerator-runtime/runtime'; import { runCommand, getCommandAndArgvFromCli } from '../lib/commands/helpers'; import { exit } from '../lib/utils/helpers'; /** * Main entry point, run md-seed cli * @return {Promise} */ const run = async () => { try { // recive the command and the arguments input from the cli const { command, argv } = getCommandAndArgvFromCli(); // run the cli command await runCommand(command, argv); exit(); } catch (error) { exit(error); } }; run();