@frenchbread/dq-models
v0.2.1
Published
Models lib for dq
Downloads
22
Readme
dq-models
Mongoose extension with schema handler.
Insalling manually:
$ npm i git+https://frenchbread:[email protected]/frenchbread/dq-models.git
Update geo db under its node_modules
:
$ npm run-script updatedb
Models available:
Account
Article
Project
Watcher
Task
Hour
Booking
var M = require('dq-models');
var Account = M.model('Account');
var Article = M.model('Article');
var Project = M.model('Project');
var Watcher = M.model('Watcher');
var Task = M.model('Task');
var Hour = M.model('Hour');
var Booking = M.model('Booking');
Init watcher
// watcher
app.use(function (req, res, next) {
// If no authentication module provided, use:
req.isAuthenticated = function () {
return false;
};
Watcher.watch('project_name', req);
next();
});
Coded by DM.