A 60 second intro followed by nearly 7 hours of code and instruction for Node JS to help you start from scratch and level up. I bookmarked all 15 chapters in the description. If you complete one lesson per day, you'll complete the full course in two weeks. Post questions in the comments below. ⬇⬇⬇ If you are new to Javascript, you should start with my full 8 hour Javascript course tutorial here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-EfAl9bwzVZk.html
Between 5:05:00 and 5:10:00 after changing cookies and adding "secure": true in authController , req.cookies in refreshTokenController equals to [Object: null prototype] {}. I am using Postman, it could be some postman issue I found my answer at 5:37:15 )
@@WanKy182 if you find it is please post an update as it may help others. I was using thunder client and noted what changes needed to be made for it. Thanks!
Sir, I got my first MERN stack developer job recently. I started learning Node from this tutorial. This is one of the best Node tutorial on RU-vid. I am highly thankful to you. Love from India 🙏🙏🙏
I'm on chapter 12 and completely new to backend tech coming from frontend experience. I must say this is the perfect tutorial series. You deserve much more appreciation. Thanks.
This is one of the BEST node courses that I have taken. Dave explains it all step by step and while showing you common pitfalls to avoid. It is simply fantastic. Thanks Dave!!!
Hey, Dave since you're very kind to read all comments... I just wanna let you know that we love you so much for putting so much efforts to make these valuable courses💞
3:05:51 , Here if i do not write "app.use('/subdir',express.static(path.join(__dirname,'/public')));" still I am able to see CSS applied code? Only difference my code has is that my 404.html file has this "" instead of "". Please explain why does it happen.
Hello, Sir. I am grateful for this tutorial. grateful for your times, hard works and more. and I am grateful for the RU-vid channel. My code stuck on Thunder client testing the 'get route' is working, but post route, and put route does not work, couldn't get anything in the body. I have compared your code over and over but still can't find any bugs.
I got it now. In the Thunder Client when making post request 1.click on the Body below the Body by default it shows JSON starting typing the first and last name we want to create and click send. In the video I didn't see the instructor show that part.
Just logged in to say thanks. Taking the time and putting in the work that goies into creating a huge free course like this, is nothing short of amazing. I have not been too comfortable working with Node, but having this seven hour long video to go through, covering just about everything there is to NodeJS, will go a long way in making me more comfortable with it. I don't think you missed anything about NodeJS, except maybe what is the name of the niece of the inventor of it (just kidding)! Mad respect and hugs to you.
Dave, not sure if you're still checking the comments on this one, but at the end of chapter 11, JWT Auth, I've been having some trouble. The thunderclient requests don't work when I include the secure and samesite options, passing in { httpOnly: true, sameSite: 'None', secure: true, maxAge: 24*60*60*1000 }, minus the maxAge part in the logout script. The refresh only responds with 401s and the logout responds with 204s, but checking the users.json shows that the refreshToken was never deleted. I'm using http and not https right now, but I'm only asking because you had said it was working for you when you were still only using http. Any idea what could be causing it?
This is by far the best Node tutorial I've watched. On other tutorials they go straight to express + mongoose but I appreciate that you went through the trouble of showing how to create a server using only Node. Makes me appreciate how much easier Mongoose + Express makes things.
It is one of the best courses I have ever seen. Your channel is underrated. You deserve more. I really appreciate that man. Thanks for your work. Respect!
Hey Dave I have a question, which node js version are you using? Because with me the web server runs but in the browser it doesn't work, just loading...
You can look at the package.json for the course files to see what version I had at the time. That said, I can run this in the most recent version of Node.js, too. Go back over your code and compare to mine for any difference.
Today, I finally finished the full 6 hours 50 minutes and 41 seconds of the tutorial. I wanted to thank you for the amazing work that you do. While I still have room for improvement as a developer as a whole, I am immensely thankful to you for making me improve so much.
I'm at chapter 11 and everything work as we expect except after I was created new user and when i try the auth/route its have the error say "bcrypt data and harsh argument required ."i dont know why but i already check all the code and re-watch video multiple time and look like the code look good shape until we sent post requrest for auth/route and return error . Please help
Watch for typos. "hash argument" for example in your message. Code doesn't like extra or missing letters. Your error points to the use of bcrypt. I suggest going back over that part of the video.
@Lil Frank Official i think maybe you didn't set bcrypt and hashing password.. check it out.. just try to post few codes lines to get grasp issue by everyone!! :)
Hi Dave 😊 I've a problem at 4:59 where you tried the auth, You see mine has been working since the beginning of the tutorial, But when it got there Thunder client would tell me "Connection was forcibly closed by a peer", Before telling me "Connection was refused by the server" I checked my console and the error was usersDB.users.find is not a function (which is definitely impossible) How do I go about it please
I have been in the industry for 30 years and Mr Gray is an outstanding tutor. Thank you for making a painful subject matter quite fun to learn. Outstanding contribution. Thank you Dave.
Is this a backend development course, Dave ? I'm just starting out on this stuff and have no idea about any of this . I'm looking for a complete backend development course . So, is this it ? Thanks in advance .
45:11 The problem is that fs.mkdir and fs.rmdir run asynchronously, so the creation of the folder may not be complete before the second if block runs. Because of this, when the code reaches the second if block, the folder might not even exist yet, or might just be created, so it can't remove it.
Hi, i'm having a trouble on chapter 11. I'm not geting to work the refreshTokenController and so does the logout... I've even copied and paste your code from github. My authController is doing just fine, it generetes the accessToken and the cookie, but when i make the refresh request, i got Unauthorized. Seems it is not geting through the following line: if (!cookies?.jwt) return res.sendStatus(401); if i erase the "?.jwt" so it became: if (!cookies) return res.sendStatus(401); i got a 403, like it haven't found the user. any ideas what may be causing this? Since now, thank you so mush for this lesson is being very teachfull
I'm just guessing because it is very difficult for me to debug viewers code from a distance. It looks like you are not sending the cookie or the cookie you are sending doesn't have the jwt. To test with ThunderClient, we had to remove the secure: true property when the cookie is created. If you are using a browser (and for production), you want the secure: true back in there. Again, just quick guessing here.
@@DaveGrayTeachesCode great! it worked, thank you very much! Don't even know where that property came from, as i'm seeing the lesson again and you haven't typed it on the lesson. Problably came from github, but i was already having the issue before I've copied your code, whatever... it is working now, thak you so much again
Firstly, great tutorial 💖 I really not satisfied any node js tutorial on RU-vid even too your video . Every tutorial teaches express framework. Please teach node js depth tutorial. Create node js project without using express. Build an api, streaming project, web socket/chat application using node js without any using framework. If you are reading comment please reply.
Thanks for your request. The 1st 5 out of the 15 chapters are Node JS only. This includes building a web server. After that, I focused on bringing together the MERN stack as many subscribers requested after my React JS tutorial. This does open the door to a deep dive in Node JS after the first 5 chapters, and I can do more Node JS only projects in the future. Thanks again for your requests! 🙏💯
I was asking myself the same question. I don't see how these can produce different results in this case, but your suggestion is far more straightforward. I hope we get an answer, since if they are different in a meaningful way, I'd like to know how!
This Course was absolutely fantastic, Dave! Easy to follow and execute; with not a single step glossed over or left unexplained (or amended where needed with deeper explanation). Thank you very much for all your hard work, it is immensely appreciated.
@@victoradodo8377 if the.env file is in the same directory and level as server. Js, try using `${process.env.ACCESS_TOKEN_SECRET}` instead of what Dave has taught... This worked out for me and it might work out for u too.
I m starting this course today I know this is gonna be awesome because I already have attended your MongoDB course and I m familiar with the hardwork you put on making these course so that we could learn easily.
45:15 When I type out this code and run it, either a new directory is created or an existing new directory is deleted. (new is the name of the directory). To me it looks, like only one of the two if conditions evaluates to true and only one of the if blocks is being executed each time. First time I run it, directory is created as no directory exists and the next time I run it, directory already exists and is therefore deleted by the second if block. Is this because the mkdir and rmdir methods are asynchronous, so they won't happen in the sequence we expect them to ? When I put the rmdir inside the callback of the mkdir, the expected creation and subsequent deletion of directory occurs, leaving no change in the file tree. Is it by chance that this happened in the video ?
Wow! I always find your tutorials really easy to follow and the way you explain is awesome. Thank you for your passion to share your knowledge and talent for us students to learn these kinds of programming languages
At 1:25:25, you note that we can download from the repository to get the img1 and other code that you are using (such as the css file). Where is that repository?
Dave is without a doubt one of the finest teachers on RU-vid. It leaves me speechless that he doesn’t have MANY more views and subscribers; pretty sure time will fix that!
Hi Dave, I am halfway through this course and I just wanted to say thank you. The way you initially explain smaller modules and then integrate them into the project makes it much easier to understand. I am looking forward to complete this along with your React course over the Christmas break and then use the knowledge for my final year computer science project. I really can't thank you enough!
Hello! When I try to log in I get this error: "POST localhost:3001/auth/login 400 (Bad Request) Form.jsx:82". I did not change any of the backend code and I connected to mongodb, I even put your predefined users and posts in collections and tried one of them to log in and it is not working. What should I do?
I might be missing something. Where is the explanation of the ode I'm writing? I feel like I'm just writing without code without knowing what it actually does
Elegant and methodical manner of teaching!!! These kind of tutorials help beginners pick up the concepts in an easy manner, while giving the much required confidence. Keep continuing the good work and thanks a lot!!! Gratitude :)
Hey Chethan! Do you usually learn through these online tutorials ? Have you created any projects? Would you be interested in exploring opportunities in web development?
Hi, Dave. Firstly i want to thank you for your great job. Secondly i have a question. Is this course enough to work with node.js as a developer or there much more to learn afterwards? I mean if i absorb everything in this course can i say that "i know Node.js"?
Hey Dave, you really are an amazing teacher and your tutorials are well structured, detailed and practical. They've helped me a lot, and I hope you are getting well compensated for your outstanding tutorials. I would really love to see you also do tutorials on Django framework
here is my issue I cant get the get the files to work beyond the first file 01tut i added the 02tut will not work without putting the ./02tut/files what am i doing wrong do i need the path common core
Im not a complete beginner more like a junior in js/frontend. But god damn. Logic is not the hardest for me cause i solved many coding problems (not very hard ones, but decent enough). But all theese new things are pretty hard to me. Not easy to remember. All the methods and properties... And to know when and where to use them. Probably need to burn fundamentals in my brain to understand better cause i dont have any clue what's next step or result.. Not like in frontend. Create a function to move this block to the other side or add click event on a button to get a number, etc...
This tutorial is nothing short of amazing! I recently started my first dev-job and I got great feedback on my first code-review! I credit that 100% to coming across this tutorial! Hats of to you sir and thank you from Sweden!
Hi Dev I have one doubt My role is junior react devoloper ( 6 months experience after internship completed) But my goal is full stack developer So my question is When i will start to learn Backend?
If you already have an internship, ig it would be clear to u what u like frontend end or want to explore backend. It's upto you, start learning whenever u want!
@@countmein5164 oh ok But my Team members ( frontend team) adviced me, 1) first to become strong in frontend then you can start Backend otherwise you will struck in middle 2) however Google said you can start Backend as well as learning Frontend ( like 5 days react + weekend node) So which one is i will choose?
Thank you very much! I currently have this same structure in my project.. although I keep reading about people merging to postgresql, but I see few projects here on youtube of people combining node with postgres. Have you ever used that combination?
Notice that the api folder you are referring to _is in the routes folder_ . Both users and employees files are in the api folder because they relate to the data the api is providing. Feel free to organize in a way that makes sense to you. There is no one specific correct answer for this.
Such a great video, I really appreciate it! I have a suggestion for another - you could possibly use this project as a base, and go through the changes you would make, for the project to adhere to Best Practices 😊
I am currently trying to learn how front and backends are built and how they communicate with each other, and I have to say your videos are definitely the best there are. I've watched several other videos with more views but they just don't explain things as well as you do. You definitely have a gift for teaching! I've also never subscribed to any channels before (not my cup of tea), but I just had to subscribe to yours, and I will definitely go through all of your tutorials. They will hopefully help me build my first SPA and land a job in the field. So thank you Dave and keep up the amazing work!
My web dev learning has begun with your courses and progressing in the proper full stack path. Hope you keep uploading new content and a complete full stack application soon.. Thank you Dave.. ever grateful for your content
i have a question : we are supplying public folder for subdir as well in chapter 8 routing for css for 404 page but mine is working without it can anyone explain why ?
Indubitably, within the framework of conveying my unequivocal endorsement and alignment with the content of your previous request, I am inclined to engage in an even more protracted expression of agreement, which involves the utilization of additional verbiage and linguistic elaboration for the sole purpose of further emphasizing the affirmative nature of my response, thereby resulting in a heightened and elongated declaration of "yes."
This course is definitely not for beginners but I recommend it for intermediate level devs, Try John Smilga's course for beginners Reason for this is because not all the explanations go down to little details which can leave a beginner confused but nevertheless, this is a perfect tutorial as soon as you get a little grasp on the basics of express
As mentioned at the beginning of the tutorial, it is not for Javascript beginners, but if you know the basics of Javascript already, you are ready for this course.
This is, in fact, the best nodejs authentication with jwt tutorial I've seen so far. Nothing was glossed over, unexplained or trivialized. Thanks so much Mr Dave. I believe authentication tutorials should be complete with all pros, cons and dangers highlighted. Once again, thanks Mr Dave for the good job.
Thank you! And if you know React, you may be interested in my React Login series that interacts with the backend Node REST API created in this Node course: ru-vid.com/group/PL0Zuz27SZ-6PRCpm9clX0WiBEMB70FWwd
This series has been so extraordinarily helpful in my journey to becoming a paid developer. The quality of content and explanations surpass that of the bootcamp I graduated from by orders of magnitude, and that's not an exaggeration. It almost feels criminal that this stuff is being made accessible for free. Super excited and eagerly awaiting your new developer course, as well. Thank you for everything you do! This is truly life-changing stuff.
I just finished this course and i would say frontend is more difficult than backend. I feel like a Fullstack developer already. You are a wonderful teacher Dave, Thank you 🙏
Thanks dave for this awesome content...just completed...by far one of the best courses available for node js on RU-vid.. thanks again for sharing your experience and make us understand in such a easy way.. really appreciate your efforts.. thanks again... Happy New year. 🙏
@@bhrigumonibaruah251 from this one you will get a clear understanding for sure...I already had some experience in node. I think if you want to learn in short span then go for this one, you will get a lot to learn for sure and most importantly, in a very easy way.
Thanks Dave! I really love your teaching style and I have not imagined someone can explain concepts so clearly and holistically until I watched your videos! This is probably the best tutorials I have been watching this year! 😀
The title is misleading. This is not a node course, except about reading and writing files. This is course on express and some other packages and how to perform crud operations. If it were about node it would explain about how libuv bindings work, what is event queue, workers, threading, pooling, processes, sig kinds, etc.. etc..
Thanks for the note. I understand what you are seeking. With the title being "Node.js Full Course for Beginners", I think much of that would go too deep for beginners. Maybe search for "Node.js All the Details" or "Node.js The Hard Parts" or something similar. Or have you considered making your own? Most of my requests were for a course that would detail building a backend for a frontend app like the MERN stack. The first 5 chapters are exclusively Node and not just about reading and writing files. Express starts in chapter 6 and it is a Node framework.
Don't get me wrong, I love your work and this course is amazing. Just thought to say it because some people might get confused and think node is only mongo and express and miss to learn some more fundamental stuff.
@@Smrtnyk thank you, Milan. I agree that there could be another node course that is more advanced and goes into more of the docs specifically about node without frameworks. Thank you for the kind words 🙏💯
I repeat the code from turtorial and everything seems to be working okay, but refresh token is a pain.. I see jwt token in cookies once Ive logged in but those cookies not saved anywhere, and when I try to go to any page it still checking fo that BEARER, and cookies disappearing. Anyone else having same issue?
Check your secure: true flag in the cookie. If you are using it, it only works with https. The authorization header uses "Bearer " + the access token. The cookie has the refresh token. An httpOnly cookie is not accessible with JavaScript. You should be using an httpOnly cookie.
@@DaveGrayTeachesCode Thanks for reply Dave! Just cloned your repo and still having the same issue. By any chance we need to change something in Thunder Client? Will carry on and see how it will behave once will be connecting to front end. Might be Thunder Client my isssue:)
@@londonsky1835 it could be. I haven't used it in awhile. You can try Postman, too. If I remember correctly, I have the secure: true flag active in the repo. Check how the cookie is created in the controllers.
4:25:47 You mentioned when sending refreshToken along with JSON, it creates a dilemma for the front-end developers? is it because you cannot save tokens in memory once it's in JSON? then how about accessToken? Shouldn't we send accessToken with httpOnly cookie as well?
The refresh token has a longer lifespan. It should only be stored in an httpOnly cookie that is not accessible by Javascript. The access token has a short lifespan. It should only be stored in the state of the frontend app. Neither should be stored in local storage. I go into more detail about this for the frontend in my React Login series: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-nI8PYZNFtac.html
1:15:10 There is no need to create class for Event Emmiter... it works without it, it only get confusing creating a class for it... But anyway this is the best tutorial I've found on the internet. :))
Thank you! 🙏 Interesting note! They do create a class in the official docs, and I usually follow the docs examples when creating a tutorial: nodejs.org/dist/latest-v16.x/docs/api/events.html#class-eventemitter
Hallo Dave i am a big fan of you an i have to tank you for all help i got by watching your videos 🫡. I have a question by the way: Could you make a video that shows how to make node js app even more scalabl and performant? Like increase CPU or spred workloads to more node instances?
You certainly can do that. Currently, I like using something like the express-async-errors package ( www.npmjs.com/package/express-async-errors ) to catch unexpected errors to kick out to the generic error handler instead of putting async / await all throughout. I also like to handle expected errors like 400, 401, and 403s with custom response messages. I usually check for expected causes of those in the controller.
Thanks for the this very comprehensive content 🤗, this is the best Node Tutorial that youtube have. I wish you'll make a Angular Full Course 😃, I will really appreciate it😌
Dave ..... I have just finished your course I am a frontend developer looking for being a fullstack developer (MERN) thanks for every second ... for every line of code ... for everything this is exactly what I was looking for
Sorry, am just starting to learn this, after I finish, do I learn everything here like I can go on to learn other things like react or anything else or am I supposed to learn other things about node first
Dave - I replaced ur "class" use and setup of Emitter extends .... with ... myEmitter = new events.EventEmitter(); / fyi (in the spirit of replacing classes with functional components) / Dave R
It would have been useful if you could explain the functions you are using a bit more, other than complicating things more (like using regex in Express intro or switch/case out of nowhere in content-type)...
Hi Dave, thanks for another great tutorial, I started with your html course and I have to say you've been of great impact to my front-end career. I'll like to know what extension you use for your vs code intellisense, mine is not auto completing my code.
4:22:41 - even I'm doing this but in my code refreshToken is not going to users.json, hence while checking refreshToken api it is throwing Forbidden statusCode, please help me im stuck here
It would be possible for us to develop an application for android where we can make a launcher to change the face of android, I live in Brazil and although I don't speak and understand English I like your teaching. I will be grateful for the return
The best NodeJS tutorial I have ever seen here on youtube. Learned lots of things from this for sure. Thank you very much.... I would like to see more MERN stack projects from you 😍😍😍
Literally did not say that 👀. This is the chapter that starts using the Express framework though. You must know the previous info about Node.js in order to use Express.
45:18 58:32 1:08:22 1:23:27 1:28:35 1:38:38 SUCCESSFULLY built my own web server! 2:02:14 2:23:34 2:30:53 2:41:13 2:58:36 DONT hop on CHAPTER 8 yet (routing) pracitice CHAPTER 7 even more first. 3:23:35 3:43:50 3:56:17 4:01:58 4:09:45 4:28:13 VERIFY JWT 4:39:19 REFRESH TOKEN 4:50:19 LOG OUT 5:02:16 5:15:29 MONGODB 5:39:51
Hey Dave I'm a student and trying to be a developer and i am using your RU-vid as my source for learning completed js tutorial from your channel now learning node from this video.
Hello Dave , i upload full stack project from github to run my local machine but i can't. I install node_modules for client and server but not worked .Error is in auth.Localhost:3001/auth/register not found How can i run this ?
This could be one of several issues. You cannot just download the source code and run it. You need a MongoDB account set up like I show in the tutorial. You also need your own environment variable values with dotenv. Check your Node.js console and see what errors you have there.
Hello, 6:12:50 In my terminal show "connect to MongoDB" server is running on port 3500. Everything looks fine, but inside the companyDB there aren't any user in there. I clicked refresh the page a few times, still nothing. Does anyone come across this situation or how to solve it? It's my first learning back end.