0.0.13 • Published 9 years ago

zero-node v0.0.13

Weekly downloads
53
License
-
Repository
-
Last release
9 years ago

zero-node

This module helps you deal with models used in blog or other CMS easily.

Usage

  1. Add dependency to your module package.json file like:
{
	"name" : "YOUR_MODULE_NAME",
	"zero" : {
		"dependencies" : {
			"node" : "^0.0.1"
		}
	}
}
  1. Declare isNode in module.exports like:
module.exports = {
	models : [{
       identity : "post",
       isNode : true
    }]
}
  1. Node module will generate brief for node content, you can specify its behavior through global configs:
{
	"node" : {
		auto : true,  //auto generate brief for node model
		field : 'content', //the key of node content to brief
		toField : 'brief', //which field to save brief
		limit : 300, //brief length
		exclude : [], //model in this array do not need briefing
	}
}
  1. Node will add an extra count route for every node model. For example you declared a post node. So there will be a route as http://localhost/post/count will returns the amount of post.
0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago