crudex

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i crudex

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • titarenko