The invoice generator is a simple tool for generating simulated invoice data.
The invoice generator requires node.JS and a few node modules. Assuming you have node.JS, you can install the node modules by using the following command.
[sudo] npm install
The tool can then be run from the command line. The invoice generator offers help output which should sufficiently explain the commands. Access the help by using the following command.
node generate --help
which should show results such as the following
Usage: generate [options] Options: -h, --help output usage information -V, --version output the version number -t, --type <array|mongoimport> The type of format to generate -o, --output <file> The file to which to output the generated records -n, --number <records> The number of records to generate
Importing into Mongodb
If you use the Mongo DB type option, then the output file can be imported directly into a mongo collection.
mongoimport --db barista --collection supplier --file output.json