Thursday, 11 July 2019

How to add txt file in a folder using node js


var fs = require('fs');
fs.writeFileSync('notes.txt',Hello Iam Rajashree);







Go to cmd prompt < node app.js






Click notes.txt file you View the output in notes.txt








Append a message in notes.txt

var fs = require('fs');
fs.appendFileSync('notes.txt', '|| 'Thanks for Watching ');
 





Out put









No comments:

Post a Comment

SEO introduction

What is SEO? SEO(Search Engine Optimization ) is a technique that helps to bring the Website on top. Seo depends on the Keyword . Ke...