Skip to content

shootshoot/mongoose-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoose-helper

Before using mongoose-helper, you must initialize the mongoose connection

mongoose.connect('mongodb://localhost/kitchensink');

After that, you can configure your mongoose models in an external file :

require('./shemas');

Content of ./shemas.js

var 
	schemas = {}
	mongooseHelper = require('mongoose-helper')
;
schemas.StaticContent = mongooseHelper( "StaticContent", {
    title: String,
    content: String,
    updated_at: Date,
    created_at: Date
});

exports = module.exports = schemas;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published