An open API service indexing awesome lists of open source software.

https://github.com/frenchbread/dq-models

DQ extension for models.
https://github.com/frenchbread/dq-models

Last synced: about 1 month ago
JSON representation

DQ extension for models.

Awesome Lists containing this project

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:

1. `Account`
2. `Article`
3. `Project`
4. `Watcher`
5. `Task`
6. `Hour`
7. `Booking`

```javascript
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

```javascript
// watcher
app.use(function (req, res, next) {

// If no authentication module provided, use:
req.isAuthenticated = function () {
return false;
};

Watcher.watch('project_name', req);
next();
});
```

## License
[MIT](https://github.com/frenchbread/dq-models/blob/master/LICENSE.md)