Good Morning Guys :) Finally, aj simple API in NodeJS Awesome :) Plz LIKE and Share the videos ok :) N do Follow me 🔴 Instagram Link: instagram.com/vinodthapa55 🔴 NodeJS Tutorial in Hindi 2020: ua-cam.com/play/PLwGdqUZWnOp00IbeN0OtL9dmnasipZ9x8.html
I'm so grateful to have discovered your channel. You're a great teacher. Thank you Sir for all the efforts you put in making these videos so informative.
ek suggestion hai bro pls agar tum naam le kar batao to jyada easy hoga understand mae. at 6.13 appne bola user jab bhi isko call kare isko kisko ye samjahne mae tim lag jata hai. other sites jaise udemy etc. paar wo mouse se highlight karke naam bhi lete hai file ka ya kisi bhi chiz ka . This is just suggestion I think your teaching pattern can improve. Brother you are going to great and one video all understanding. Thank you for all videos.
great video..one comment.. 13:54 agar second data dejkhna hoga array mein to index 1 hona chahiye that..koi ni XD...ur videos are very easy to follow and have helped us a lot!
after *JSON.parse(data)* the page is failed to load, But it's printing successfully in console In your case it's working Maybe there are some updates in node js , Let's move further *ThIs is the error* node:_http_outgoing:742 throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Array at new NodeError (node:internal/errors:371:5) at write_ (node:_http_outgoing:742:11) at ServerResponse.end (node:_http_outgoing:855:5) at Server. (E:\Programming\Node js\httpserver_8\index.js:19:13) at Server.emit (node:events:390:28) at parserOnIncoming (node:_http_server:951:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) { code: 'ERR_INVALID_ARG_TYPE' }
To all the people who are having problem to show data In console or webpage , just replace the path as C:/user/admin/node(main file)/userApi/user.json Try this format , Happy coding :)
THE BIGGEST PROBLEM COMES IS URL AND ALL YOU TYPE GET HIDDEN OR OVERLAPPED BY THE TITLE OF THE VIDEO,VERY PROBLEMATIC,u ARE SO GOOD AT programming ,do sth about it
Vinod bro it's very useful video but i getting one error ...that is when i run index.js file then we will get json files data into terminal but i didn't get it...it's showing error that is "Undifined".
Thapa sir, yeh video bohot hi awesome tha but ek doubt yeh hai ki main JSON se saare data access kar pa raha hu but address access nhi ho raha hai please help me...
else if (req.url === "/Userapi"){ res.writeHead(200, {"Content-type" : "application/json"}); res.write(JSON.stringify(objData)) res.end(); } res.write() accepts data type string or buffer. & JSON.stringify converts the object to a string
#doubt Last me agar object me parse krne ke baad res.end(object) ya res.end(object[0]) kr rhe h to data show kyu nhi ho rha jbki res.end(object[0]. something) krne pr ho rha h ?? ????
hey bro can u help me like when I try to do parse and then I tried to access perticular value of the key then I am not getting anything and I don't know why 😥
Do this your issue will be resolved fs.readFile('./userapi.json',(err,data)=>{ const objData = JSON.parse(data.toString()); res.end(JSON.stringify(objData)); }
Suppose ham kisi aur server se nodejs ke api pe 2 ya 3 parameter send krenge aur jaise hi node js me wo data aaye to koi action perform hona chahiye to kaise kren.
how can make API to use MySQL data base for my react js project, Is there any video on this topic plz suggest me. and please make a simple mini project video with MySQL in react js. Thanks
the data is showing in console but not in the browser.the error is TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Array
The error you are encountering is due to passing an object (objData) to the res.end() function instead of a string or a buffer. The res.end() function expects a string or a buffer as its argument, but you are passing an object (objData) directly. To fix this issue, you need to convert the objData object to a JSON string using JSON.stringify()
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Object... i am getting this type of error after implementing above video. so, please give me reply how to solve this error ?
Good Morning Guys :) Finally, aj simple API in NodeJS Awesome :) Plz LIKE and Share the videos ok :) N do Follow me 🔴 Instagram Link: instagram.com/vinodthapa55
🔴 NodeJS Tutorial in Hindi 2020: ua-cam.com/play/PLwGdqUZWnOp00IbeN0OtL9dmnasipZ9x8.html
Your channel deserves more subscribers Thapa Ji
sir ek chota sa app banane ka video daliye....app hoga billing generation
Node js series 19 video me
Err invalid http tokan ye
Err aara hai
Sir jab ham bahar se api lete hai to vo hamare api ke id ke according kese api send krte hai?
Ek video se hi 95% Samaj Gaya. Thank you bro👍👍👍
I'm so grateful to have discovered your channel. You're a great teacher. Thank you Sir for all the efforts you put in making these videos so informative.
yeah he is really a good teacher
Boom guys
how much nodejs you have completed?
Best videos on UA-cam.
If anyone wants to become a web developer.
Easy and knowledgeable videos.
thanku for being consistant throughout. waiting for your latest javascript course
ek suggestion hai bro pls agar tum naam le kar batao to jyada easy hoga understand mae.
at 6.13 appne bola user jab bhi isko call kare
isko kisko ye samjahne mae tim lag jata hai.
other sites jaise udemy etc. paar wo mouse se highlight karke naam bhi lete hai file ka ya kisi bhi chiz ka .
This is just suggestion I think your teaching pattern can improve.
Brother you are going to great and one video all understanding.
Thank you for all videos.
Waiting bro. I'm also a small UA-camr. I know how much hard work u r doing
No one is small Brother, me bhi small hu apne app ko compare kru tho.. jinke 1million subs hai
@@ThapaTechnical yes that's true . luv that u atleast took a moment to reply m. Thx brother. loved ur videos. thx for everthing
@@ThapaTechnical sir.. we are waiting for MERN series, so that we learn how to combine all these technologies.
small keh ke insult na karo bhai
3 2 1 BOOM
this video is awesome.
Brother your videos have really quality content.
it is really helpful.
Thank you
😊😊😊
Such a great teacher you are 💘💖
Hahahah....really....i think there are lot of great teacher's are available than him.
Sir make a playlist for backend (beginner to advanced)
Also make full stack web developer (beginner to advanced) playlist
Sir plz start MERN series with real world projects PLZZ Sir..
yes, I also want that sir start MERN series
One Request 🙏
Please create E-Commerce website using MERN Stack.
Love from Kolkata 🥰
your teaching is awesome
great video..one comment.. 13:54 agar second data dejkhna hoga array mein to index 1 hona chahiye that..koi ni XD...ur videos are very easy to follow and have helped us a lot!
ye api wala data hame kaha se milega
Beta moj kardi aapne
nice thapa bhai
Congratulations for 2 lakh subscribers sir🎉🎉👍👍
after *JSON.parse(data)* the page is failed to load,
But it's printing successfully in console
In your case it's working Maybe there are some updates in node js , Let's move further
*ThIs is the error*
node:_http_outgoing:742
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Array
at new NodeError (node:internal/errors:371:5)
at write_ (node:_http_outgoing:742:11)
at ServerResponse.end (node:_http_outgoing:855:5)
at Server. (E:\Programming\Node js\httpserver_8\index.js:19:13)
at Server.emit (node:events:390:28)
at parserOnIncoming (node:_http_server:951:12)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) {
code: 'ERR_INVALID_ARG_TYPE'
}
do this
const objData = JSON.parse(data)
res.end(objData[0].price.toString()); //assuming you want to display price of index 1
@@suparnaadhikari8782 helpful
Thank you so much sir. I am able to learn alot from this channel. Keep up the good work.
your explanation is awesome easy to understandable🙃
loved it fully
Thankyou so much Sir for this wonderful video. It really helped me to complete my project
Awesome Video man
Thanks for for information sir
thank you very much.
Superb...................
if my life api is ever uploaded , you ll find your name is big thanks varibale
18:12 roz like kartahu.
Hello Bro, plz provide row code in description, it is help me a lots
Thank U Brother Nice video
Man you are great !! But i feel like you are missing out many basic Subtopics that are very much important.
Anyways you do BEST compared to others
Would you mind sharing the subtopics name
Bhai online api kaise fetch kaise karenge node me plz reply?
One Request 🙏
Please create E-Commerce website using MERN Stack.
Love from Kolkata 🥰
This tutorial is very helpful
Waiting for project😍
Mja agya bro ❤️
Video se pehle hi nice video comment karane aaya hu😂
Thank you so much ☺️
Awsome tutorial! Could you please show us the POST request as well? I mean how to add data to the file using the API?
To all the people who are having problem to show data In console or webpage , just replace the path as
C:/user/admin/node(main file)/userApi/user.json
Try this format , Happy coding :)
Tqsm shalini ☺ it fixed my error
but still same error :/
awesome tutorial sir
Thanks
Bro please start mern series .
THE BIGGEST PROBLEM COMES IS URL AND ALL YOU TYPE GET HIDDEN OR OVERLAPPED BY THE TITLE OF THE VIDEO,VERY PROBLEMATIC,u ARE SO GOOD AT programming ,do sth about it
API LINK : jsonplaceholder.typicode.com/users
Thanks
Thanks
by writing this in userapi.json undefine is comming in terminal,what i do?plz help
thanks bro............ ; )
@@shwetachaudhary8265 same here
Great Work!!!!
Very very helpful video🎥
You are great sir
Thapa Bhai aap node js ko kitne part me complete kroge 1 rough Idea hi De do . Fir me apni planning us hisab se karunga
can anybody tell me, from where did he copy paste the data into userapi.json file??
Hello sir, please start Express and Mogo DB with React frontend to made a dynamic web application.
Bhai pls also focus on how to write mvc architecture codes
this video is helpful
Awesome
Thanks!!!
awesome video. Thanks
Vinod bro it's very useful video but i getting one error ...that is when i run index.js file then we will get json files data into terminal but i didn't get it...it's showing error that is "Undifined".
Same problem
Sir app reply Kyu nahi dete comment ka ?? Kabhi kabhi important hota hai. Please important comments ko reply Kar Diya karo
sir ye json mai api kese bnaayi hai ye bhi node ke playlist mai shamil krna chahiye tha.... Ham practice k liye ye data kese provide kre ge
great bro! Are API and Rest API same?
sir, this API is working all the time or when we start the code then only
Thapa bhai jab me npm install karta hoo toh proxy behind error detect ho raha he windows 10 me...toh kese karu install?
Bhai pls android studio pr bhi videos banao...
Thapa sir, yeh video bohot hi awesome tha but ek doubt yeh hai ki main JSON se saare data access kar pa raha hu but address access nhi ho raha hai
please help me...
You are awesome ❤️
Sir ye userapi ka data kha se pasta kiye h hm kha se pasta kre
UserData folder kaise aaya or kab ye point thora problem creat kar raha h sir
Sir at 12:10 you wrote URL of the JSON placeholder website
thank you for this.
else if (req.url === "/Userapi"){
res.writeHead(200, {"Content-type" : "application/json"});
res.write(JSON.stringify(objData))
res.end();
}
res.write() accepts data type string or buffer.
& JSON.stringify converts the object to a string
Bhai react ko node se kaise connect kiya jai iske upar ek video banaye na please 🙏
Can webscrape and use the data to create api...and does it require every time computer on to keep server alive
thapa bro i was try multiple time but showing undefined multiple times
@Naveen Kumar can u send the full code? i am comfused a little bit
Solve hua kya bhai
Maza a gya lush
#doubt
Last me agar object me parse krne ke baad res.end(object) ya res.end(object[0]) kr rhe h to data show kyu nhi ho rha jbki
res.end(object[0]. something) krne pr ho rha h ?? ????
hey bro can u help me like when I try to do parse and then I tried to access perticular value of the key then I am not getting anything and I don't know why 😥
@@pankajsharma-rf1ov bro this was 5 months back I don't know the context now 😅 but you can message me on insta may be I can help @gaurav_1k3
i was not able to directly display parsed json data object on localhost.
Try this:
else if (req.url == "/users") {
fs.readFile(
"path",
"utf-8",
(err, data) => {
const jsonData = JSON.parse(data);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(jsonData[0].address, null, 2));
}
)
}
Do this your issue will be resolved fs.readFile('./userapi.json',(err,data)=>{
const objData = JSON.parse(data.toString());
res.end(JSON.stringify(objData));
}
What if i use image src inside data and deploy it will it fetch image to another devices or not?
Great
🎉❤
Suppose ham kisi aur server se nodejs ke api pe 2 ya 3 parameter send krenge aur jaise hi node js me wo data aaye to koi action perform hona chahiye to kaise kren.
Hello Vinod, Is it possible to share code / raw data files like json file used
How did u get this api data
In my case it's show undefined in terminal please help me what to do
Boom and good morning
json file kaha se milegi ??
If else url is not working in my PC please give me solution
when to call the API the path you have given i have a doubt on this part so can you pls tell me what was it ?
Sir, please zoom in when you type the URL.. Its too small to see.
how can make API to use MySQL data base for my react js project, Is there any video on this topic plz suggest me. and please make a simple mini project video with MySQL in react js. Thanks
Pls tell advantage of jason over Api
Nice
json.parse method not work porperly please help me with this
json file kaha se milega jo iss video me use hua h?
address to thik h
but paddress nhi aya smj. 😀😀😀
Hlw sir can I use put, post, delete method using nodejs and json file
I want json file as a database and create api using nodejs and do all method like post , push, delete, get
Where we get a api file Bro
Plzzz JSON file bhi dete to live practice bhi kr paate 🙏
bhai agar mern website localhost sa hata kaa domain ka use kara to website server par 403 error show ho raha haa .what can i do
the data is showing in console but not in the browser.the error is TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Array
@Naveen Kumar but he data is not shown in browser .it giving null on console objData.status
The error you are encountering is due to passing an object (objData) to the res.end() function instead of a string or a buffer. The res.end() function expects a string or a buffer as its argument, but you are passing an object (objData) directly.
To fix this issue, you need to convert the objData object to a JSON string using JSON.stringify()
how to get whole array of object no a single property of object
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Object...
i am getting this type of error after implementing above video.
so, please give me reply how to solve this error ?
if you have resolved the issue please help me I am also stuck with same
same error