Posts tagged with nodejs


Here is the simple chunk of code to replace a particular section in a file asynchronously. fs.readFile(filePath, 'utf8', function(err, data) { if (err) { return console.log(err); } var result = data.replace(your-regex-or-text,replacement-text)…

This post explains how developers can circumvent the Same Origin Policy implemented by all modern web-browsers by requesting data in the JSONP format. Generally modern browsers do not allow POST, PUT or PATCH request if…