Node - Js-Part1 U
Node - Js-Part1 U
Js
Local and Export Modules
Node.js File system -
To check wether Node.js installed in
your system or not.
In Visual studio we have already installed an Extension , Still need to install few
more extensions
Install Prettier code formatter
After installing prettier code
Install Vscode -icons
After Installing VS code Icons
Live server installation
After Installing Live server
Install Code runner
Now go back to explorer
Click file open folder
Create a New folder
Created a new folder
• If you're working with frontend (React, Vanilla JS, etc.) → Browser Console is best
• If you're working with backend (Node.js, Express, Databases) → Terminal Console is the best
Just by giving node
command you will
enter into the node
environment .
data (Buffer/String) → If the file is read successfully, this contains the file's content.
1. process.on('uncaughtException', callback)
callback (err): A function that receives the Error object (err) and handles
it.
…….
• Instead of waiting,
• Once the file is read, the callback function executes and prints
the file's contents.
• If an error occurs (e.g., file not found), the callback handles it.
This is the new name (magazine.txt) that book.txt will be renamed to.