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');              

Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?