generator-mongoose

2.0.3 • Public • Published

generator-mongoose Build Status

Gitter

NPM

A generator for Yeoman.

Getting Started

What is Yeoman?

Trick question. It's not a thing. It's this guy:

Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.

Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.

$ npm install -g yo

Generator Mongoose

While running through a leafy mongodb field he picked up mongoose.

To install generator-mongoose from npm, run:

$ npm install -g generator-mongoose

Finally, initiate the generator:

$ yo mongoose

It should output a file structure similiar to:

.bowerrc
.editorconfig
.jshintrc
config/
  - db.js
public/
  css/  
     - style.css
  js/  
     - script.js
models/
    - post.js
routes/
  - index.js
  - post.js
test/
  - test-post.js
views/
  - index.html
bower.json
Gruntfile.js
package.json
Readme.md

Run the app

Development mode

$ grunt 

or

$ grunt server 

Production mode

$ grunt prod 

Sub Generator Schema

Run the sub generator for schemas:

$ yo mongoose:schema "article|title:String,excerpt:String,content:String,published:Boolean,created:Date"

output:

You're creating a schema for article
With the fields: title,excerpt,content,published,created
   create routes/article.js
   create models/article.js
starting request to schematic for test mock data...
   create test/test-article.js

Getting To Know Yeoman

Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.

If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.

License

MIT License

Bitdeli Badge

Package Sidebar

Install

npm i generator-mongoose

Weekly Downloads

0

Version

2.0.3

License

none

Last publish

Collaborators

  • afj176