cloudcmd/lib/server/root.js
2015-04-07 11:01:35 -04:00

17 lines
396 B
JavaScript

(function() {
'use strict';
var DIR = './',
path = require('path'),
config = require(DIR + 'config'),
mellow = require('mellow');
module.exports = function(dir) {
var root = config('root') || '/';
if (root === '/')
dir = mellow.pathToWin(dir);
return path.join(root + dir);
};
})();