mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-06-05 20:02:13 +08:00
23 lines
385 B
JavaScript
23 lines
385 B
JavaScript
/**
|
|
* Dependencies
|
|
*/
|
|
|
|
var url = 'localhost/deployd';
|
|
|
|
module.exports = require('mdoq')
|
|
.use(function (req, res, next) {
|
|
var path = req.resource && req.resource.path;
|
|
this.url = url + (path || this.url);
|
|
next();
|
|
})
|
|
.require('mdoq-mongodb')
|
|
;
|
|
|
|
/**
|
|
* Export a way to change the storage url.
|
|
*/
|
|
|
|
module.exports.storage = function (db) {
|
|
url = db;
|
|
return this;
|
|
}; |