}
function serveStatic(staticname, response) {
- var pathName = "./res/"+staticname;
+ var pathName = "";
+ if(typeof global.njspurls.mainResPath != "undefined") {
+ pathName = global.njspurls.mainResPath + "/" + staticname;
+ } else {
+ pathName = "./res/"+staticname;
+ }
console.log("Pathname for check is ", pathName);
fs.exists(pathName, function(exists) {
if(!exists) {