Opinionated project generator for node.js relying on express and mongoose
Bumm is an opinionated project generator for node.js
npm install bum -g
First cd to the directory where the project should be created
Create a project skeleton via
bumm app testapp
Next cd to testapp
And install required packages through npm
Create a model, route and views via
scaffold command. The model
should have two properties "title" and "description" where title is required.
bumm scaffold test title:string:required:true description
Model validators are specified after property name and type in plain mongoose syntax. In case no type is specified the property will be of type string.
Mongoose types 'String', 'Number', 'Date', 'Buffer', 'Boolean', 'ObjectId', 'Array' are supported. Types are case insensitive.
node app.js and navigate your browser to
Project generator for node.js using express and mongooseUsage:bumm [options] command [arguments]Options:--help, -h Output this usage dialog--version, -v Output the version of Geddy that's installedCommands:app <name> Create a new applicationscaffold <name> [Attrib] Create a new route, model and views for <name>view <name> [Attrib] Creates views for a <name>route <name> [Attrib] Creates a route for a <name>model <name> [Attrib] Creates a new mongoose model for a <name>Attrib:Attributes are used to describe properties of models used in routes, viewsand of course models using the schema:[name]:[type]:[validator]:[validatorValue]:[validator]:[validatorValue]...Examples:bumm app todo Generates an express app skeletonbumm scaffold item Generates item model, route and views supportingbasic CRUD operationsbumm view item Generates item viewsbumm scaffold item name:string:require:trueGenerates item model, route and views with a singleproperty "name" that is required.