NodeJS: Important NodeJS Modules and URLs

This post is a on going article of important NodeJS Modules with thier usage.


[Update: Jan 25th 2022 ]

  1. NodeJS Source districution URL, contains installation instructions for both RPM and DEB based distructions and along with manual instructions

URL: https://github.com/nodesource/distributions/blob/master/README.md#debinstall 


fs - File System - Module

  This module is used to perform file system related operations in Node.JS, like reading and writing to a file.

  1const fs = require('fs');

  2 

  3 fs.writeFileSync('app.txt', 'hi welcome to the nodejs course');

  4 

  5 console.log(String(fs.readFileSync('app.txt')));

  6 

  7 fs.appendFileSync('app.txt', 'sample text');              

0 comments:

Post a Comment