A CLI for scaffolding a node application with Mongoose as the ORM.
This CLI is heavily based on the
rails CLI from Ruby on Rails.
norse model [modelName] [...fields]
Creates a new model with
modelName as the name (
norse model Post creates Post.js).
norse model Post field:type
Post model with
field as the document attribute and
type as the attribute type (String, Boolean, etc...). By default the field will have type
String if not specified.
norse controller [controllerName]
Creates a new controller with the name being
norse controller post creates postController.js).
norse controller post create update
postController with the methods of
update(). By default
destroy are all created.
norse scaffold [modelName] [..fields]
Creates both a model and controller based on the
modelName provided and
fields provided. The default methods from controller command are added by default.
norse scaffold Post title description published_at:Date
Will create a model of
Post with supplied fields and the controller of
postController with default methods.