dcjayasuriya2020
dcjayasuriya2020
2 things: 1. when we have to export config file to index.js, code in config should mention correct module/ in this lecture the export "environmentToExport" does not directly noticed.. as...
code in the datafile is `lib.baseDir = path.join(__dirname, '/../.data/');` in git bash it indicates when run for test err, ``` $ node index.js file:///E:/Learn/lib/data.js:15 lib.baseDir = path.join(__dirname, '/../.data/'); ^ ReferenceError:...
how complete the ftruncate ? with/withtout callback(false)? my code in RESTful API is : lib.update=function(dir,file,data, callBack){ //Open the file for writing fs.open(lib.baseDir+dir+'/'+file+'.json', 'r+',function(err,fileDescriptor){ if(!err && fileDescriptor){ var stringData = JSON.stringify(data);...
my code: `var firstName = typeof(data.payload.firstName) == 'string' && data.payload.firstName.trim().length >0 ? data.payload.firstName.trim() : false;` but when it runs in git bash, I got the err as : `$ node...