For my mobile friends ⭐️Course Contents ⭐️ ⌨️ (0:00:00) Installing Nodejs ⌨️ (0:05:22) Working With Modules ⌨️ (0:14:40) The Events Module and EventEmitter Class ⌨️ (0:22:32) Working With The ReadLine Module. ⌨️ (0:34:36) Working With File System Module (Creating,Reading,Deleting,Renaming) Files ⌨️ (0:45:04) Working With File System Module. Creating and Deleting Folders ⌨️ (0:57:36) Working with Readable and Writable Streams ⌨️ (1:02:40) Why you should use Streams ⌨️ (1:05:41) Pipes and Pipe Chaining. (Readable,Writable and Transform Streams) ⌨️ (1:12:36) Creating a Http Server using the Http Module ⌨️ (1:17:52) Serving Static Files with Http and File System Module (html,json,image) ⌨️ (1:24:30) Create our Package.json using Npm Init ⌨️ (1:27:18) Installing Packages using Npm (Node Package Manager) ⌨️ (1:32:23) Semantic Versioning ⌨️ (1:36:42) Getting started with Express Web Framework ⌨️ (1:40:48) Working with Express Http Get Request, Route Params and Query Strings ⌨️ (1:49:52) Serving Static Files with Express ⌨️ (2:54:36) Http Post Request with Express and Body Parser Module ⌨️ (2:00:17) Working with JSON Data with Express and the Body Parser Module ⌨️ (2:07:40) User Input Validation With Express And JOI ⌨️ (2:15:24) User Input Validation with JOI Validating Nested Object and Arrays ⌨️ (2:22:34) Getting Started With EJS Templates With Express ⌨️ (2:35:22) How does MiddleWare Work and Creating Custom Middleware ⌨️ (2:42:49) Working With The Express Router
@dasshrs4 жыл бұрын
Can you help me please? I can't send a user an HTML file with post method. When i send json from form i can see it in developer tools but html doesn't load on screen. It works with default form though.
@theblazingpiano35034 жыл бұрын
@@dasshrs I would post your question not as a reply but as a normal comment so more people will see it.
@seiitkhanotegali77342 жыл бұрын
@@dasshrs nu cheo nashol reshenie? chto delot to?
@TheSgrizli3 жыл бұрын
This guy is 99 years old and still making tutorials. God bless!!
@charlesdupouy3 жыл бұрын
i see the reference !
@ashwin55105 жыл бұрын
Just 14 mins into this video, I completely feel this is the best video for beginners out there who wish to learn node.js without much coding experience. Not all the highly viewed videos or highly liked videos are so understandable as this one.
@prondubuisi6 жыл бұрын
Awesome course, In case you are having the error of "Error: Cannot find module 'ejs' " when you run node app from 2:25:24 run "npm install ejs" to fix this error
@sleeksilk4974 жыл бұрын
Thank you, I just figured this out few minutes ago. Was wondering if ejs comes with Express or you'd have to install separately.
@leomarquez23494 жыл бұрын
thanks!!!
@jaker57984 жыл бұрын
@4:35 you copy the folder path to use in your cd. One trick I love is in explorer window file path you can type "cmd" and press enter and a new terminal opens at that file path
@thesankhadip4 жыл бұрын
My God, Its 2020, you are still saving lives... God Bless you brother...
@_.sunnyraj._4 жыл бұрын
4 Dec 2018
@assassinali15783 жыл бұрын
Who is here teaching themselves how to code and wanting to become a full stack dev.
@abcdabcd86053 жыл бұрын
Me! I'm just starting ..can you share your progress, what all you learnt, in which order?
@cedricmendoza83163 жыл бұрын
@@abcdabcd8605 I'm a learner myself. But the way I approached it, HTML, CSS, Vanilla Javascript, I'm on way now to frameworks but I'm still working on my skills with vanilla js.
@abduljabbarazam9433 жыл бұрын
I'm learning nodejs so I can write scripts for AWS Lambda
@iansmith68443 жыл бұрын
@@abcdabcd8605 wow me too!
@shivangsingh23292 жыл бұрын
Not me. I'mma just chilling with person's voice.
@marklibby65763 жыл бұрын
This was a great course. My only suggestion is for those of us who were following along, it would have been helpful if you showed the CSS and index files so we could pause the video to replicate them in our project. For example, I was able to do that for the form, but I know I was missing a lot because there were two after the and I don't know what else you had in your html.
@salahelraies3234 жыл бұрын
2:13:37 validate isn't a function since version 16 of joi the working function is: const schema = Joi.object({ name: Joi.string() .min(6) .required(), email: Joi.string() .min(6) .required() .email(), password: Joi.string() .min(6) .required() }); const validation = schema.validate(req.body); res.send(validation);
@KippiExplainsStuff3 жыл бұрын
duuude thank you!! was going crazy
@dokidoki4083 жыл бұрын
sorry, but where do I place this code.
@salahelraies3233 жыл бұрын
@@dokidoki408 the function at 2:13:37 which gives you the error, replace it with this code if it's still valid. If it's not working anymore I'm sorry but i haven't seen this video since then.
@agep.58535 жыл бұрын
It's nice when someone takes a step back now and then to explain WHY we are doing something. You do that very well.
@CrepsDelic3 жыл бұрын
For anybody doing this tutorial and struggeling with the "app.use('/public', express.static(path.join(__dirname, '../static')));" --> Remember to href="/public/your/path" (Your scripts and stylesheets) dont make the mistake to href="/static/your/path" Sure it helps someone! Cheers!
@tanvybhola89843 жыл бұрын
Helloo! Help please😅 In part 3, working with readline module.... They haven't shown readline module, that is creating too difficulty to understand as begineer... If you made it Or have any solution or suggestions.. Please give! I'm stuck
@alonshaaltiel82583 жыл бұрын
@@tanvybhola8984 Hi my guy, I hope you haven't given up yet!. My code works and has some notes that might help out. I'll share the dropbox link with you if you want :)
@tanvybhola89843 жыл бұрын
@@alonshaaltiel8258 I had to work on a project... Completed it. But if you want to share can share.. Thanks 😇
@alonshaaltiel82583 жыл бұрын
@@tanvybhola8984 Glad to hear :)
@dokidoki4083 жыл бұрын
I made this mistake, thank you for this comment.
@rrecyn-1232 жыл бұрын
the part where you explain how to serve static files with express, i love this! was searching for an eternity to find someone who show me what im doing wrong. thanks.
@michaelalippold34712 жыл бұрын
Honestly been trying for days to figure out how node works and how to get it to be in a certain folder and finally got it all from just the first few minutes of this video. Thank you so much!
@simranvermaaa3 жыл бұрын
This tutorial is the best as he has explained all the aspects of node.js in this tutorial and it is best for beginners as well as who just have started learning node.js so hats off to you my noob coder!
@ThePRINCEBARPAGA6 жыл бұрын
Thanks a ton for this! Just what I needed! I was literally speaking to friend yesterday that I am planning to learn Node.js. Looking forward! :)
@ershadtantry57744 жыл бұрын
Finally, I could wrap my head around NodeJS! Thank you very much...
@wiloghby4 жыл бұрын
one of the best tutorials I've seen for any language... very level appropriate for those coming from other languages. I have experience in BASIC, perl, python, C, C#, and some C++ and this clearly delineates the structure, typing, and syntax of the language fairly quickly (at least if you watch it at 2x like I did?)
@anotidaisheneilmisi9043 жыл бұрын
Great tip, I did 2x as well. Much better.
@alexandrucurca38775 жыл бұрын
Thank you very much for this tutorial, helped me a lot to get started, didn't stop for anything, very well explained!
@milad84363 жыл бұрын
One of the best courses on planet. You helped me a lotttt. THANK YOU SOO MUCH.
@AnthonyKosky5 жыл бұрын
I've been using node for quite a while, but this is a very helpful refresher. Thank you!
@karlee86083 жыл бұрын
Highly recommend this video to watch. Great quality content. You won't be disappointed.
@pieterdebaere5 жыл бұрын
4:29 another trick to do this is going to your requested path, and type cmd where the file location is and hit enter :) this opens a cmd in the current directory ur in.
@alimedani02964 жыл бұрын
thanks
@mattbrix35011 ай бұрын
This helped me a start learning nodeJS. Cheers!
@polyt84345 жыл бұрын
I totally recommend this video!!! Thank you for teaching Vanilla node.js !!
@rynar39525 жыл бұрын
I wish you'd somehow reduce the text size and closed the terminal if not being used. It was hard keeping track when you only see 5-6 lines of code in preview. Nonetheless, it was pretty great and pretty clear.
@ty_hans4 жыл бұрын
The text size came in handy for me. I was splitting my screen to follow through with the code editor. Grateful for the size.
@CMGM553 жыл бұрын
Text size is good but terminal could be closed when not in use
@mihin1256 Жыл бұрын
Great tutorial. Here are some updates for joi input validation. Instead of joi.validate() use this format now. here schema is the schema object formed using joi.object() in this tutorial--> const {err} = schema.validate(req.body) if(err){ res.send(err) } else{ res.send('submitted successfully') }
@bobbysmurf9915 Жыл бұрын
this fixes the error, but now the validation doesnt work and anything can be put into the inputs.
@ananyagupta1409 Жыл бұрын
@@bobbysmurf9915 i did it like this and it worked -> const result =schema.validate(req.body); if(result.error){ console.log(result.error); res.send("error has occured") } console.log(result.value); res.send("successfully posted data!");
@ArvindKumar-kz8sn6 жыл бұрын
Really Helpful video on Nodejs. Watched without any break and didn't feel bore. learned a lot. thanks alot sir. appreciated
@justdvl5 жыл бұрын
If someone struggles with error "ValidationError: child "email" fails because ["email" is required]" at around 2:14:00, this code will help: let object = {}; req.body.forEach(element => { object[element.name] = element.value; });
@stevenparson17275 жыл бұрын
Thanks David! I knew this is what needed to be done to make the code work but my JavaScript-foo wasn't strong enough to come up with your solution.
@johnnguyen16555 жыл бұрын
I got the error Error [ValidationError]: "value" must be an object when calling validate function. Did you have solution for that?
@blueandgreen14654 жыл бұрын
I struggled with that and your solution helped! Thank you!
@sunnyparmar96924 жыл бұрын
thanks alot david
@UMLGxPr0s1 Жыл бұрын
If your css and js isnt connecting you must put and in your actual files even though they are in the static folder
@richardnixon40254 жыл бұрын
It's given me a great start in node.js. Great stuff!!
@abhinavjain89624 жыл бұрын
Literally one of th ebest node tutorial...Thanks dude....YOu're great..!!
@NoChillAustin4 жыл бұрын
Everyone, for when doing ejs you have to do npm install ejs in order for it to work properly.
@johnnguyen16554 жыл бұрын
Your tutorial is awesome, not only nodejs, we can learn alot more. Thanks million!
@natashasamuel93462 жыл бұрын
Great class. Keep up the good work. Thank You, Natasha Samuel
@abhishek-shrm5 жыл бұрын
Awesome video. Thank you so much for this video. I would love to see more videos on this topic from you.
@sergiyrudenko9056 жыл бұрын
Thank you! Great lesson! sorry buy it's hard to follow you with this type of screen(only couple line of code on whole screen...)
@ayaanahmedshohan54225 жыл бұрын
yeah , thats make so much problem to understand code
@kiko4534 жыл бұрын
Hello...I'm stuck at 2:11:30. which is User Input Validation with Express and JOI. The error I receive is that Joi.validate is not a function. I checked and it's been deprecated. Can you please share how to fix this issue?
@ShrubScotland4 жыл бұрын
It seems that function has been discontinued and replaced. Instead you call the function on the schema. Here is my solution: app.post("/post", (req, res) => { const validation = schema.validate(req.body); if (validation.error) { res.send("something went wrong"); } res.send("success"); });
@georgesjournal66942 жыл бұрын
Who here is doing the blockchain course and watching this to get caught up with how to use NodeJS lol?
@kokoshibo52442 жыл бұрын
me
@aleksneceski83844 жыл бұрын
If anyone is struggling to understand some of this, just have the documentation open alongside and read up on some of the function calls. There's a ton of stuff to learn and only so much that can be fit into each video!
@milankbudha3 жыл бұрын
best programming channel in the world
@mirandahobbes81893 жыл бұрын
22:44 thank you so much for this great course!!!!
@ApexArtistX2 жыл бұрын
Best tutorial in KZbin. Clear and precise with clean codes for beginners
@harshchaudhary84692 жыл бұрын
At 22:25 he says its synchronous and hence executed in in order called. Would it have been different if it was async?
@harshchaudhary84692 жыл бұрын
Pls tell 🥲
@NoobCoder6 жыл бұрын
I don't have the source code for every part unfortunately . ** Note there is a difference between the index.html file between the following videos, Please check the github below Http Post Request with Express and Body Parser Module github.com/noobcoder1137/express_json_http_post : Its like at 1:54:36 User Input Validation With Express And JOI : 2:07:40 github.com/noobcoder1137/user_input_validation_JOI_Express User Input Validation with JOI Validating Nested Object and Arrays : 2:15:24 github.com/noobcoder1137/joi_validation_nested_objects_and_arrays
@TheDomian2 жыл бұрын
Thank you very much
@avigarg78592 жыл бұрын
This is the one of the best begineer video
@nehuentupaccoveloduran47794 жыл бұрын
Love it, super clear and easy to understand what u say, but pls pls reduce the text size, that makes super nervous
@nishant_singh Жыл бұрын
Loved it ! ✨✨
@akshittrivedi14294 жыл бұрын
Getting error 1:53:45 refused to apply style from because it's MIME type
@dokidoki4083 жыл бұрын
I'm also having the same problem were you able to find a solution?
@hey.............4 жыл бұрын
I am having following error at 2:32:10, Error: Could not find matching close tag for "
@harshchaudhary84692 жыл бұрын
Is there a mistake at 22:25, isnt the example he giving wrong it wouldn't matter if it's sync or async as the same function is being called.
@sudosai3 жыл бұрын
(0:32:06) I think there is a better and concise way of writing it. Correct me if I am wrong. rl.on('close', () => { console.log('Correct'); }); rl.on('line', (userInput) => { if (userInput.trim() == ans) { rl.close(); } else { rl.setPrompt(`${userInput} is incorrect. Try again `); rl.prompt(); } }); rl.question(`${num1} + ${num2} = `, (userInput) => rl.emit('line', userInput));
@JaimeCaicedo5 жыл бұрын
I would like to thank you for your awesome tutorial. You make it really easy to understand and not boring at all. Please keep going you're doing great !!!
@ahmadshahzad76124 жыл бұрын
Bro went from basic to classes faster than I can follow.
@ArsalHussain4 жыл бұрын
This Is Pure Node JS Tut, Learn ES6 First Before Learning Node
@barryward61213 жыл бұрын
Very good course for people wanting to get started with node
@danielchukwu90616 жыл бұрын
concise, neat, all in one to jumpstart using Node! I reeeeeeeeealllllllllllllllly love it! :O
@Ravin_raze4 жыл бұрын
very nice video it helped me to shift from python backend development to nodejs backend
@zedal16 жыл бұрын
Finally, a nodejs tutorial that starts from the very basics. Most other tutorials on nodejs would jump into http server or some other complicated use of nodejs. In fact, this tutorial helped me understand callback functions, even though the tutor used anonymous version ( ) => of callbacks. Kudos and keep it up Mr Pedro. Will find your channel and subscribe. You are a very good teacher
@NoobCoder6 жыл бұрын
Thanks for the kind words, appreciate the support
@kishorecmg4 жыл бұрын
We just need more people like you.
@80Vikram4 жыл бұрын
People who wants to learn node, I recommend "Node.js Tutorial for Beginners: Learn Node in 1 Hour | Mosh". This particular tutorial is not for beginners ( author didn't bother to explain many fundamental concepts ) also I personally didn't like teaching style; felt super sleepy many a times
@yayz_4 жыл бұрын
I tried Mosh's video and while it explains the fundamentals, this one is perfect for people like me who wants to delve deep and start using node.js
@raidoung41004 жыл бұрын
yeah, Mosh's tutorials got those music ...;d kind of distracts ;p plus all those effects going on in front of your eyes ;d i prefer Brad's or this one i guess;d
@raidoung41004 жыл бұрын
@Kotetsu Chan Whatever makes you happy :d but thanks for mentioning the fetch api :))) i wasnt sure if it was important but now that someone mentioned that - i guess i will pay attention to that:d What I like about Mosh is ....let's be honest people like him :> But if i were him i would improve a bit the pronunciation . English is Brad's first language and i find it easier to listen to him ;d
@muzammilsyed23394 жыл бұрын
Just enhance the speed to 1.25x
@ze_chooch4 жыл бұрын
Which fundamental concepts are not included in this tutorial?
@davidpocsai34193 жыл бұрын
A simpler way to delete a non-empty directory. Add the optional second parameter (options object) and set the recursive key to true. This will prompt the rmdir function to delete the entire directory recursively. fs.rmdir('./newDirectory', { recursive: true }, (err) => { if (err) throw err; else console.log('directory and all files deleted successfully'); });
@alonshaaltiel82583 жыл бұрын
Thanks for the info, noted it down. and your Error message is simpler and faster to write. Two thumbs up :)
@TottiBln5 жыл бұрын
Best nodejs tutorial ever!
@AndrielleHillis5 жыл бұрын
@2:39 Actually, ctrl+` (the button above the 'tab' key) will also bring up the terminal.
@andraspoljak3 жыл бұрын
4:18 isntead of copying just write cmd there and the command prompt will pop up using the folder you are in
@jakeriordan96626 жыл бұрын
Thank you for the brilliant tutorial! I just wanted to clarify, that when serving static files with express and using the alias of '/public' in this case, that I need to specify the href as 'public/styles/style.css' in the html file, right? So the href references a path that is virtually created? Despite the actual file path being 'static/styles/style.css'. Sorry if this is a silly question!
@AmerginBodhmall5 жыл бұрын
thanks for this
@leomarquez23494 жыл бұрын
DUDE!!!!! Thank you so much!
@sddjango15104 жыл бұрын
thanks brother
@dokidoki4083 жыл бұрын
Man thank you for this.
@ananyagupta1409 Жыл бұрын
yes and you can also just get rid of the /public altogether if you dont want to name your folder as public
@Rafael987_004 жыл бұрын
Excellent beginner tutorial. I was just a bit bothered by the lack of spaces after a comma, parenthesis, and arrows, but that were good and simple introduction examples :)
@ttthaiss2 жыл бұрын
2:05:45 I though res.json() returns a promise that resolves to a javascript object. In the video it is said that it takes JS and converts it into json. Can anyone clarify if the video is incorrect? Thank you and thank you once more to the author for making this fantastic video
@2010giant3 жыл бұрын
18:47 Why we need to use "super()" here? if I just let this._name= name; can I make Person._name=name and use the name in "on" method? which extends from EventEmitter.
@higormuros2 жыл бұрын
Thank you for this wonderful course!
@FreshGuava1614 жыл бұрын
It seems the Joi.validate(request ...) method is deprecated since v16, now it's more like schema.validate(request)
@alirashid35623 жыл бұрын
Please increase the volume on the videos great work:
@balloney21755 жыл бұрын
re: "rl.question(`What is ${num1} + ${num2}? `," (line number 8) It took me 3 hours to figure out why it is printing "What is ${num1} + ${num2}?" instead of "What is 4 + 11?" (whatever the random numbers). Then I put my eyes closer to the monitor of my laptop and noticed that I should use (`) instead of ('), the former is on the leftmost of the keyboard, while the latter is below the double-quotes. What makes the difference? I almost gave up.
@raghavrathor68225 жыл бұрын
Thanks for addressing this issue, i too was facing similar problem, now resolved. Happy sharing
@ShrubScotland4 жыл бұрын
template literals! they are new to ES6. It's just quicker than doing all the concatenation - and more readable. (the symbol is usually called a "backtick")
@MahadyHasan4 жыл бұрын
Thanks for creating Grate content. But why too much zoom that it could not see the full code block when you writing something. All the time you scrolling and it is very difficult to focus on a full block of code!
@alaaawad71805 жыл бұрын
i saw this vid on 1.5 speed until i got to the last 3 min, i got so used to u on speed that u sounded drunk on normal speed lol. anyway great job on this tut really like that u dived more then the other usual express/node tut here in youtube. i found most node/express tut try to hide a lot from u, so u don't end up confused but what end happening is that miss a lot of details that hurt your understanding on node/express.
@johnnguyen16555 жыл бұрын
best node tutorial I've seen. BTW I just concern that if we use stream to read/write file by chunks, how can we ensure that the chunks are in right order?
@anzo.p4 жыл бұрын
Brilliant! Expands on what really happens under the hood when you use your favourite libraries.
@hassanbelmekki6243 жыл бұрын
Nice video i followed all your steps in NodeJs and add the Express JS module, it was informative, there is one issue i got with the dependency of joi@14.0.0 even when i got the 17 version and downgrad it i couldn't get the same result i got some errors related to headers even tho i commented the middleware of json and urlencoded ({extended : false}) I noticed that the joi.validate(req.body,schela, (err,result)=>{ } always landed on err not on result
@atsushiidobe911311 ай бұрын
I am just starting to learn node js after learning JavaScript. I appreciate the tutorial and how helpful it's been so far. Now, I am following the section "Working with the ReadLine Module" and on line 17 following the if() statement, I noticed there are no curly brackets. Is that how the code should be written? In JavaScript, curly brackets are always needed after any if(), else if() or else statements.
@dowlat4546 жыл бұрын
Great tutorial video Pedro. Learned a lot.
@srikanthambaldhage22683 жыл бұрын
Great tutorial and explanation. Thanks man
@paulocabelloacha41956 жыл бұрын
Amazing. Thank you guys!!!
@jonahprudenciado3 жыл бұрын
Hi coach, May I ask please! Doyou have a tutorial for the downloaded template project to import into visual studio? Thank you!
@tpadma74192 жыл бұрын
superb teaching ......thank you sir
@robinsingh44924 жыл бұрын
Nice explanation of every concept. Thanks
@honglangford97333 жыл бұрын
@18:47 The super keyword is used to access and call functions on an object's parent.
@EyasTayyem5 жыл бұрын
Thank you for the great video!
@thiyagutenysen80584 жыл бұрын
what extensions do you use for auto-completion and suggestions?
@ArsalHussain4 жыл бұрын
This Is Visual Code.
@kimdinh83596 жыл бұрын
Your tutorial is awesome. Thank you NoodCoder
@blueandgreen14654 жыл бұрын
Complete, very well structured and explained ! Thank you, Pedro, for this amazing free tutorial !
@ttthaiss2 жыл бұрын
Really great job. Thank you for this.
3 жыл бұрын
Thanks for nice explanation, very good video.
@Mar_Ten6 жыл бұрын
Love the video. Keep it going.
@danieln3omadeira2934 жыл бұрын
(1:07:37) The path for the file to be piped with the readable stream must be relative... Else it won't work (tested with Node.js 15)
@sciphilo7544 жыл бұрын
Lovely tutorial! Thanks a lot!
@davidomego5 жыл бұрын
Hey, nice video about the readline module. If you enter Ctrl + C in the command line it triggers the rl.on("close") event, and then go on saying you are correct. I think you can correct this by creating a child class and editing the close event call back and you can pass a parameter to know where it was fired from. Get it??
@ashishbankariya29284 жыл бұрын
Thank you sir. This course is so helpful.
@YoungGrizzly6 жыл бұрын
All that to print Pedro.... Thanks for the knowledge I will be learning more about this in time.
@NoobCoder6 жыл бұрын
No problem
@JoshT4life4 жыл бұрын
For anyone who might not be able to run it after installing. Make sure to set your variable path. Probably the most important part
@bpera1 Жыл бұрын
How do I do that?
@atsushiidobe911310 ай бұрын
Would you be able to post the code for the section "Working with JSON Data with Express and the Body Parser Module"? I didn't get the serialized data back like you did, instead I got back the same JSON object as the previous section "Http Post Request with Express and Body Parser Module".
@justdvl5 жыл бұрын
So 2:00:17 - what is the benefit of preventing sending data via default submit post method, and rewriting it into ajax request?
@yv58085 жыл бұрын
On default, the site awaits for an Html file response and will display that if it gets one. Sometimes you don't want it to refresh or want to manipulate what is being sent with client-side javascript.