mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
25 lines
No EOL
599 B
JavaScript
25 lines
No EOL
599 B
JavaScript
(function(){
|
|
"strict mode";
|
|
|
|
var DIR = process.cwd() + '/',
|
|
LIBDIR = DIR + 'lib/',
|
|
SRVDIR = LIBDIR + 'server/',
|
|
Util = require(LIBDIR + 'util');
|
|
|
|
/**
|
|
* function do safe require of needed module
|
|
* @param pModule
|
|
*/
|
|
exports.require = function srvrequire(pSrc){
|
|
var lModule,
|
|
|
|
lError = Util.tryCatch(function(){
|
|
lModule = require(pSrc);
|
|
});
|
|
|
|
if(lError)
|
|
console.log(lError);
|
|
|
|
return lModule;
|
|
};
|
|
}()); |