🔴 #21: Streams and Buffer in Node JS with Example | Readable & Writable Streams in Node.JS in Hindi
HTML-код
- Опубликовано: 22 авг 2024
- Welcome, what is Streams Module in node js in Hindi?
Streams are objects that let you read data from a source or write data to a destination in a continuous fashion. In Node.js, there are four types of streams −
Readable − Stream which is used for a read operation.
Writable − Stream which is used for a write operation.
Duplex − Stream which can be used for both reading and write operation.
Transform − A type of duplex stream where the output is computed based on input.
Each type of Stream is an EventEmitter instance and throws several events at a different instance of times. For example, some of the commonly used events are −
data − This event is fired when there is data is available to read.
end − This event is fired when there is no more data to read.
error − This event is fired when there is an error receiving or writing data.
finish − This event is fired when all the data has been flushed to the underlying system
Streaming means listening to music or watching a video in ‘real-time’, instead of downloading a file to your computer and watching it later
🔴 Follow me on Instagram: / vinodthapa55
************ Must Watch Videos For Web Development ************
➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: • React JS Tutorial in H...
➡️ Fat Arrow Function in JavaScript in Hindi 2020: • ES6 Tutorial #8: Fat A...
➡️ #22: React JS Project Netflix App Part #1 in Hindi in 2020: • #22: Props in React Js...
➡️ Install VS Code for ReactJS LINK: www.thapatechn...
➡️ Check Complete Reactjs in One video here 👇 • ReactJS For Beginners ...
➡️ HTML in One Video: • Learn HTML in One Vide...
➡️ CSS in One video: • Learn Complete CSS In ...
➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
➡️ JavaScript in One video: • JavaScript in One Vide...
➡️ ECMAScript 6 in One Video: • ES5 & ES6 | ECMAScript...
➡️ HTML5 in one video: • HTML5 Tutorial in One ...
➡️ CSS3 in one video: • Learn Complete CSS3 In...
➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
➡️ Jquery in One video: • jQuery in One Video in...
➡️ JSON in one video: • JSON in One Video in H...
➡️ ReactJS in one video: • ReactJS For Beginners ...
➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
➡️ NodeJS in one video: / ipnwakoibt
➡️ MySQL in one video: • Complete SQL & MySQL i...
********** CLICK HERE TO WATCH ************
➡️ Fetch API in JavaScript: • Fetch API in JavaScrip...
➡️ AJAX tutorial for beginners in Hindi: • AJAX tutorial for begi...
➡️ Async Await in JavaScript in Hindi: • Async Await in JavaScr...
➡️ Promises in JavaScript in Hindi: • Master The Promises in...
➡️ Callback Hell in JavaScript: • Callback Hell in JavaS...
➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
➡️ Source Code Link: www.thapatechn...
➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
➡️Plz show some love to My Siter RUclips Channel and Plz Subscribe Link: / @mayabeautyvlogs878
**************** MUST WATCH VIDEOS *****************
➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
➡️ How To Become a Web Developer 2020: • How To Become a Web De...
➡️ How JavaScript Works: • How JavaScript Works i...
➡️ Follow me on Instagram: / vinodthapa55
Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
➡️ Link: • Make Website Responsiv...
Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
Don't Forget to Follow me on all Social Network,
Website Link: www.thapatechn...
Instagram Link: / vinodthapa55
Facebook Link: / vinodthapa55
Twitter Link: / vb55thapa
Facebook ThapaTechnical Page Link: www.facebook.c...
Good Morning guys :) Aj ka video is very useful and informative hai about What Exactly Streaming is? Plz LIKE and SHARE the video with your friends ok :) and for more plz 🔴 Follow me on Instagram: instagram.com/vinodthapa55/
Bhai Android Studio par kab video banaaoge we all are waiting.
nice video sir, but rstream not defined ka error aa raha hai... please help
video axha lga . like kr dia. 6:05 :D
but you didnot reply to comment for any doubts
bhai aapko bahut deep knowledge hai JavaSCript ki. Thnk you for sharing your knowledge with us :))
Hello vinod you are just awesome..... Can you give us a video where you can show how to build Amazon clone with react JS....like clever programmer..... because we understand properly when you explain in Hindi..... Your style of explaining is damn awesome bro..... please 🤞
Itne details me to google bhi nhi batata...Your tutorials helps me a lot ...Thank you bhai
not enjoyment and not sorrow only see awesome ,fantastic nodejs video
Bhai apki saari videos is best.
amazing video! very informative and in depth. Brother, can you please make a roadmap for how to learn SERVER-SIDE-PROGRAMMING?
your teaching method is❤❤❤❤👏👏👏👏❤❤❤❤
instead of res.write , we should have used res.append (i think so), bcaz when another stream of data will come then the previous data will be overwritten.
but i think , we use append for adding new data not for overwriting.
No bro it's showing error
@@factomindset1407 i also realised that
.on method to EventEmitter class ka method h ..to... server object on method ko kayse access kiya..???
Same question too....!!
a big request of your fan . I watched webdev simplified on Zoom clone but it had some issues. Pls show us a live video on how to do video live stream like zoom or Google meet with screen sharing option, Recording feature and user login system authorization. Thankyou
Thank you so much ☺️
underrated channel
It is a best things you share sir..❤
Bhaiya Ji SuperHit😊👏👏🙏
sir...please make video on payment gateway ...
You said that streams are object of EventEmitter but your are not creating any object of EventEmitter why ?
not sure but i guess its there when we created , rstream = fs.ReadStream();
@@datastructure_solved5839 HI,
Like event.on("xyz", ()=>{}), we use "xyz" as event name and we call that event using event.emit("xyz");
So i think the same way we are using server.on("request".....). But there is no calling to "request". Can u explain me then what does "server.on" do? Below is the code.
server.on("request", (req, res) => {
var fs = require("fs");
fs.readFile("input.txt", (err, data) => {
if(err) {return console.error(err);}
res.end(data.toString());
});
});
Thnk u.
Plz plz make mongodb tutorial with node js after this...🙏🙏🙏🙏
jaroor
@@DigitalAman tu kyu reply de raha hai🤣😂😂
Vinod Bhai is the best
sir have issue in res.write(chunkdata) i follow u step by step
-------->>>>>>>>
E:
ode\streamModule\index.js:11
res.write(chunkdata);
^
ReferenceError: res is not defined
at ReadStream. (E:
ode\streamModule\index.js:11:5)
Alert📢: there is a small mistake. Thapa Technical didn't use encoding in same line after the mentioned file path. Without encoding this code will run perfectly for small files but if you use larger files then page will keep loading.
Server.on('request'
Yea request kaha sea aya ??
Or yea on exactly hea kia ??
This was a pretty awsome video, can u make a video on streaming sql database using sequelize
I enjoyed a lot in this video thanks sir
Issue I written code but answer is not showing in local host server
hi why emit is not used here???.....
This tutorial is very awesome
I have a doubt. How we can call an event without using EventListner clasd
It's not always necessary to use adEventListner .. there are many more methods like off, once etc
@8.15 how did you add the shortcut. is it the feature of vscode ?, did you install any plugin in it >?
install node snipets
@@SauravSinghGarg-yb2vu thanku bro for your help
use NODE-SNIPPET , 2ND option in VS-CODE
And boom 🔥🎉
Could you please make video on native stream
Bhai Android Studio par kab video banaaoge we all are waiting.
Thanks for this sir
this course in very good
superb video. thanks
thanks sir😊
How we get node-fs shortcut ??????
use NODE-SNIPPET , 2ND option in VS-CODE
how to use node-fs shortcut?? How to enable it mine not working
Sir How Can I Use Mongodb In Node Js.
Please Make Video In Future.
I Have To Learn :)
Instra pista kaju badam gram masala share kardiya
sir me pura 4 din laga diya akhir ye streams and buffers hai kya kuch samaj nahi aa raha tha but apki video dekhane ke bad concepts clear hogaya but doubt abhi bhi hai kya node.js ka streams and buffers ka official documentation pura samjna jarrori hai as a developer ?
in 1st way when we read file, then we have to use utf-8 ? but you did not use that.
How to stream a video plz do a video on that i am trying to do it but only buffer is shown
I am Loving IT
Nicely explained sir
Bro I think you missed to explain flush callback(), rest vedio awesome bro
You are great sir
[nodemon] app crashed - waiting for file changes before starting...
How to solve this error?
💓💓💓
nice work lad.....
ye hard tha brother
bhaiya why we write this "request", on this line what does that mean
Bro one thing, The title of the video shows buffer, writable steam but you didn't talk about it and on the other hand, it does employ the full feature of steams. Please either choose correct titles or give full knowledge which is mentioned.
Awesome video sir
thanks for making vedio bro
res.write(chunkdata) after compiling am getting res is not defiened.
would you help or comment it out for the response.
i m also getting eror in this, pls will u help me
majaa aagyaa
we have made server.on(request , (err, data).
but we are not triggering the request event, still it gives us data in browser..
can anyone solve this confusion of mine?
vinod I have a question this time How we get exact data without changing uft-8
means we are not getting buffer data
Thanks alot sir
you are awosame
sir its is showing error thst end,write are not the functions
Please give an example if image frames in stream
Sir please make a video on javascript intersectionObserver
If(error) return console.log()
Samjh Nhi Aya...
Isko Hum Jo Pahle Likhte The Simple Method Se Bhi Likh Sakte Hai....
its if statement, check out his Javascript series :)
Dai please create video on middleware in nodejs
I want to take data from
Any server not from local directory
We want like AWS-S3 bucket or cloudinary
Bhai Error AA rha hai ye
events.js:292
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND 127.0.0.1
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
Emitted 'error' event on Server instance at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1495:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:17) {
errno: 'ENOTFOUND',
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: ' 127.0.0.1'
}
8:16 not working
bhaiya aap ne ye node-fs kasa banaya ha mera to kaam nahi karr raha
Mast
sir please make a video for streaming using mongoose
Please Make video on lazy loading...
Sir server.on likha aapne to eventemitter ka use kyu nahi kiya ? Request bhi ak event hena🤔
Make video on video streaming bro
Why we use server.on ....?
sir thell me that node shortcut extenssion....???
Hey Thapa,
I want to create a live broadcasting application. Where I will stream my screen and video and the users can see the live video. u can say like a cricket match. and I don't want the user's video. I will communicate with them through message. Can you guide me on what should I do?
pls location tracker pe koi tutorial bnaen
thk bhaiyaa
Mera code run nahi huaa sir
.on se to event define hote h n aur .emit se fire hote h aapne to kahi bhi .emit use nhi kiya naahi aapne event's ko require kiya fir kaise ye .on se event call ho gya plz anyone tell me yaar 😕😕
How to create a short cut?
that node fs shortcut ,is it pre built in or u have done it personally.?
Pre
🔥
bro ye arrow kaise type kiya?
1:00
Bro I have Telegram bot that streams music in Telegram voice chat and iam using nodesoursce setup v.16x in that bro can u please suggest me which version is good for that kinda stuff????
sir smg nahi aaya?
First review and nice video
buffer??
Please cover ejs template language within series.
He already cover it. ejs is just file extension of react js
Sir doubt toh clear kr diya kro
Can any one easily Explain what is mean of .On ⁉️
it's like what we want from our function that what our function have to do after emit
Event to .then() ki tarh hai
stream nahi hua
const fs = require('fs');
// Create a readable stream
const readableStream = fs.createReadStream('input.txt');
// Create a writable stream
const writableStream = fs.createWriteStream('output.txt');
// Pipe the data from the readable stream to the writable stream
readableStream.pipe(writableStream);
// Handle 'finish' event when all data has been written
writableStream.on('finish', () => {
console.log('Data has been written to output.txt');
});
what is the name of the NODE-JS SNIPPET u just used in the 8:11 min bhai ?
*same Question brother. ***
use NODE-SNIPPET , 2ND option in VS-CODE
*_NODE JS ME LIVE STREAM_* ❓ WOW
*_PHP ME LIVE STREAM HOTA H_* ❓
that shortcut didnt work, what should i do?
use NODE-SNIPPET , 2ND option in VS-CODE