0.0.1 • Published 8 years ago

crudex v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

crudex

CRUD+ controllers for bex

Example

require('crudex')(db, {
	table: 'table',
	view: 'v_table',
	validator: {
		name: v.isLength(10),
		email: v.isEmail()
	},
	create: {
		before: function (params) {
			params.password = bcrypt(params.password);
		}
	},
	'&/plus10/:param': function (params) {
		return this.json({ param: params.param + 10 });
	}
})

todo: good readme

License

MIT