Node.js and NPM Tutorial: readFile & writeFile, Require Modules, and Install Packages

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 67

  • @moomoo3578
    @moomoo3578 Год назад

    This video helped me quickly understand what NodeJS is all about. Now I can talk to developers to better understand their needs. I'm a DevOps by the way. Thank you so much. Can't wait to see how webpack works.

  • @edwinfeliz5487
    @edwinfeliz5487 4 года назад +8

    Now this is what I called a teacher, Thank you

  • @dadaradabada6928
    @dadaradabada6928 2 года назад

    bro i found your channel yesterday, i then proceeded to unsubscribe from almost 20 other channels focusing on mern stack ..u r the best!

  • @duskairable
    @duskairable 4 года назад +3

    Brad you have teaching gift, love all of your tutorial videos.

  • @healerdance7
    @healerdance7 4 года назад +4

    I came here on your last video to tell you that you're the best teacher I ever watched.
    I watched your video "JavaScript Template Literals: JSON to HTML" and your explanation are so good and precise that I enjoyed watching it.
    Well done, u deserve more subs.

  • @steliosalexandrakis78
    @steliosalexandrakis78 3 года назад +1

    Wow! Coding suddenly just became fun! Kudos to you sir and your superb teaching skills!

  • @nekdo9590
    @nekdo9590 4 года назад

    i have watched two of your videos so far and your explanation is excellent 🙏

  • @afflictionmarketing5303
    @afflictionmarketing5303 4 года назад +1

    Although it's too late in India. But i can't wait till morning to watch this boot camp video tutorial.
    Before today, i used to horrified by the rumours about the command line and node.
    But after watching this video i am a bit confident that this is quite simple if you get the step by step guidance. It's more simpler if you have a teacher like Brad 👍
    Great tutorial.

    • @LearnWebCode
      @LearnWebCode  4 года назад +1

      Thanks so much! It's true, we've all had nightmares about the command-line at some point.

  • @DevMadeEasy
    @DevMadeEasy 4 года назад +4

    What a nice content!
    Thank you so much!

  • @shahriarparvezshuvo4760
    @shahriarparvezshuvo4760 4 года назад +3

    I missed your cat today. 💔
    But loved your Smile at the outro. 😍

    • @LearnWebCode
      @LearnWebCode  4 года назад +1

      😂 I need to start putting snacks on the desk so she makes a guest appearance in every video ❤️

    • @shahriarparvezshuvo4760
      @shahriarparvezshuvo4760 4 года назад

      @@LearnWebCode Haha. 😂 That's would be great. I would love to watch her playing around. 😍

  • @andrewrico8321
    @andrewrico8321 4 года назад

    Best instructor ever...?

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 4 года назад +1

    Following your courses here and udemy thank you. Like and share all

  • @sheraz_razzaq
    @sheraz_razzaq 3 года назад

    Love you Brad

  • @frankherbert3779
    @frankherbert3779 2 года назад

    Very nice, helped me to get started. Cool!

  • @ram-gb4xg
    @ram-gb4xg 4 года назад +1

    best teacher! great way of explaining, it'd be nice if you could make a video on Angular :) thanks

  • @atouchofa.d.d.5852
    @atouchofa.d.d.5852 4 года назад

    This was a great intro!

  • @thundy3348
    @thundy3348 3 года назад

    I'm this far into the playlist, and I felt I should mention how jelly I am of the braces. I really need them again but it's not in the budget right now. Good on your for taking care of your chompers dude!

  • @vikrammehta4945
    @vikrammehta4945 4 года назад

    Thank you for this video. Your way of teaching is super awesome. I would like to learn node from you. Do you have any course that covers MERN stack.

  • @kirankumar-iz3tw
    @kirankumar-iz3tw 4 года назад +3

    Hi Brad...you are amazing in explanation...like magic... I am using two of your courses in Udemy...I am planning to taking html css course...is that worth?

    • @LearnWebCode
      @LearnWebCode  4 года назад +2

      Thanks! The HTML & CSS course is designed for true beginners. If you're already up and running with the basics of HTML & CSS and just want to learn more advanced styling, etc... you can likely skip that course and instead try the "Git a Web Developer Job: Mastering the Modern Workflow" course.

  • @lyricsmint567
    @lyricsmint567 4 года назад +14

    Where is "meow".?

  • @ibrahimali-xd3bw
    @ibrahimali-xd3bw 2 года назад

    Hi Brad, Thank you for this video!
    why my files icon do not change to express icon as your files ?

  • @davidsonzed
    @davidsonzed 3 года назад

    Hey Brad, I just bought your javascript course from Udemy, I have a question for you. do you have any plan to make a paid course on nodejs. I really like the way you teach, the methods and the pace etc... I will love to see a nodejs course from you on udemy.
    thank you.

  • @JimKernix
    @JimKernix 3 года назад

    So what is package-lock.json? Do you ever need to edit it or just leave it alone?

    • @LearnWebCode
      @LearnWebCode  3 года назад

      The package-lock.json file keeps track of the exact version of even the dependencies of our dependencies. There's no need to edit the file ourselves, and the file isn't absolutely necessary, but does help avoid situations where one tiny package releases an update/bug and then our entire project fails.

  • @mojtabayam
    @mojtabayam 4 года назад

    hi brad . please make a video about ES7

  • @rickdiculous23
    @rickdiculous23 4 года назад

    I believe ive figured a part of the problem out which is that require() is only accesible on the server side and not the client side.
    Im building a monster generater that generates an object with the parameters the user inputs into the form then saves the object into a json file. But i have to figure out how to allow the client to write to a json file

    • @LearnWebCode
      @LearnWebCode  4 года назад

      That's right, "require" is only a part of Node.js, not JavaScript in the browser. If you just want the visitor to be able to generate monsters and save them on their own you might not need server-side code at all. You could look into the browser's localStorage.setItem() and localStorage.getItem() - I believe it can store up to 4 or 5mb of data. You can take a complex object and use JSON.stringify() and store the plain string in local storage, and then when you want to load from that you can use JSON.parse() etc... but yes, for actually persistent storage that won't disappear even if the user deletes their browser history/storage you'd want to save it to a database server side. Or if you want to let the user download their creation as a json file - I'd google for that and checkout the first StackOverflow result. Sounds like a fun project 🥳

    • @rickdiculous23
      @rickdiculous23 4 года назад

      @@LearnWebCode the local storage will probably work for the moment but i will eventually need get a server going and learn back-end which i finally have got going through alot of troubleshooting. yeah the monster generator is actually for me to generate these objects and then save into a monster.json that way i dont have to hardcode all the stats.. it was gonna be a desktop app that acts like a game engine part i guess.. I got the form successfully pushing my objects into an array and things are smooth on that end. I just thought itd be interesting to actually add it as a feature in my game. players could fill out their own monster ideas and then vote on them and then at the end of the month or somethin i could add the most popular vote to the game even giving the creator the first copy.

    • @rickdiculous23
      @rickdiculous23 4 года назад

      @@LearnWebCode by the way, very concise tutorial I appreciate your style of teaching.

  • @JimKernix
    @JimKernix 3 года назад

    How do I fix this: Uncaught ReferenceError: require is not defined? I can run the file in the terminal but not in the browser? I need to load text as a variable into a js file somehow.

    • @JimKernix
      @JimKernix 3 года назад

      why would i use exports, require and file system if I can't output it to a web page? WTF, how the hell do you use a file as a data source for a js file?

    • @JimKernix
      @JimKernix 3 года назад

      Ok, when I do fs. there are not ANY options coming up...?

  • @Habib_HBB_17
    @Habib_HBB_17 4 года назад

    Thank you

  • @sohagroy9049
    @sohagroy9049 4 года назад

    Sir,I have taken a fully web development course from udemy by Dr. Angela Yu and then your javascript course & now I am doing your react course....Should I take your wordpress course as my next course....Or what type of course will be the best as next one.Please suggest.....

    • @LearnWebCode
      @LearnWebCode  4 года назад +2

      Thanks for the support and taking my courses! There's no right or wrong answer, but in my opinion once you understand the "big picture" of full-stack and can connect the front-end with the back-end I think it's a good time to stop with courses and just practice, practice, practice building your own projects/apps for fun. Along the way, you'll run into roadblocks and can Google / RUclips how to do certain things, but it's fun to have to apply it all towards one cohesive project you're trying to create, and you just keep repeating that process until one day you feel pretty confident.

    • @sohagroy9049
      @sohagroy9049 4 года назад

      @@LearnWebCode Thank you so much sir❤❤

    • @emmanouil1453
      @emmanouil1453 4 года назад +2

      In this course Brad teaches the internal architecture and customizations of WP while building a theme along with very useful project. Combined this with React for the rest of us and now developing React based plugins for WP, managing custom posts types and custom fields with javascript (and PHP).

    • @sohagroy9049
      @sohagroy9049 4 года назад

      @@emmanouil1453 Thank you for your kindly information.

  • @rickdiculous23
    @rickdiculous23 4 года назад

    So I don’t need the require.js library to use the require(‘fs’) function? It comes standard with node? That’s so weird I’m having an error saying require is not defined. From what I looked up i needed to get the require.js library to use the require function. But that’s not workin either

    • @rickdiculous23
      @rickdiculous23 4 года назад

      Perhaps I have misread the error but I have to get some rest. Good evening world

    • @rickdiculous23
      @rickdiculous23 4 года назад

      Actually maybe I didn’t initialize the package.json could that be the issue?

    • @LearnWebCode
      @LearnWebCode  4 года назад

      You don't need to import or download the "require" function, it's always available in the Node.js global scope by default. For real-world projects you'll definitely want a package.json file, but things should still work without one. Is it possible you misspelled something by even one character?

    • @rickdiculous23
      @rickdiculous23 4 года назад

      No i checked very carefully to see if anything was mispelled. The only thing i could think of is that when i forst installed nodejs i remember there being some kind of error got thrown but the process still finished but i was able to get my live-server going so i didnt question it amd just got to work. That was weeks ago. But now im finally ready to write to a json file but this problem has arised. I will get the exact error and get back to you very shortly

    • @rickdiculous23
      @rickdiculous23 4 года назад

      Yeah it say uncaught reference error require is not defined.
      And in my terminal I have a GET/favicon.ico 404

  • @techmathy5764
    @techmathy5764 4 года назад +2

    Eagerly waiting for this series❤️
    There is one simple question.
    Suppose in JavaScript
    var capital="capital"; //capital is a variable
    But when i console.log(capital[0]) it gives answer as c
    Is variable is a simplest array?

    • @LearnWebCode
      @LearnWebCode  4 года назад +6

      Good question. A string of text in JS is "array-like" in a couple ways, but not actually an array; they don't inherit everything from the Array.prototype, but they do have basic things like "length" and being able to use the [x] notation to get a certain character etc... For example if you try to call .map() or .push() on a string, it won't work.

  • @shargenezangana9320
    @shargenezangana9320 4 года назад +1

    Hello, first I would like to say how much I appreciate your work. I worked in the restaurant industry and during these times it has been very hard. I have 2 kids so I can afford any school. Fortunately I started self- studying CS about a year-and-a-half ago and you have been a great resource! I even signed up for your udemy class recently. I was wondering if you had any videos on Firebase. I'm currently working on a project that is a petition website. Essentially users fill out a form, then click a submit button, then their name would be added to database. I'm not too experienced with back end languages. I was told Firebase was a great an easy way to implement a back-end database. Building and designing the site I understand but how to implement a back-end database and to be able to submit collect and submit that database is foreign to me. Any help would be amazing! If not I still appreciate your time, your work, truly you are giving a great gift to humanity to helping others. Bless you sir and I wish you good fortune. If anyone comes across this comment watch this man's videos you will truly learn computer programming. He teaches in a way that is so clear and so precise and it breaks it down and very simple steps. I have learned from many online sources. And I would easily say this is probably top to top three that I have found. And this is after many online sources. Thank you again and I wish everyone the best on their Journey.

    • @jackepner9984
      @jackepner9984 2 года назад

      Agree, Brad's one of the best teachers for beginners learning to code. For Firebase, it is rather simple for an intro to backend database use.. do a search for some other resources, and you should be fine. I haven't learned it like I've learned other things (until Brad makes a course on that ;) ), but there are many tutorials online for projects using Firebase. Going through one of those may help you.

  • @surendrababuchalla
    @surendrababuchalla 4 года назад

    Good 👍 video

  • @travelingvibes7796
    @travelingvibes7796 4 года назад

    sir please can you make on nodejs course tutorial , like api and webapp without using library

  • @chintalasaikumar7584
    @chintalasaikumar7584 2 года назад

    module not found case ???

  • @MaxTheFireCat
    @MaxTheFireCat 4 года назад

    That one dislike is probably a bug because google haven't watched you videos

  • @rubenbelman7802
    @rubenbelman7802 3 года назад

    Ryan Dahl say I think Node is not the best system to build a massive server web. I would use Go for that. And honestly, that’s the reason why I left Node. It was the realization that: oh, actually, this is not the best server-side system ever.

  • @brainteasertv02
    @brainteasertv02 4 года назад

    Hello Sir, In your 10 days javascript you have told you will make an website to see what your friends are posting using MongoDB. I'm waiting for it.........

  • @tanjirmahabub5105
    @tanjirmahabub5105 4 года назад

    Hello Sir, We want vue js 3 full tutorial with project

  • @thanasisathanasi4965
    @thanasisathanasi4965 2 года назад

    It sounds stupid to me to install nodejs on a mac and use it as a production server !!!! NodeJS runs on LINUX only !

  • @shaderone07
    @shaderone07 4 года назад +1

    The very first video i watched on your channel was "Learn Json and Ajax" [ ruclips.net/video/rJesac0_Ftw/видео.html&t -- if you guys wanna take a look at it (trust me , its awesome)].
    With that 1 video I understood that You are "THE" Mentor that i.... no, we wanted. I just want to say that you have an amazing skill at explaining certain concepts in a way that each and every person can understand . Keep going . #support #Respect.

  • @chuithrowaway2864
    @chuithrowaway2864 3 года назад

    The unbiased quit contemporaneously preserve because panda consistently plug among a smooth rod. measly, one spot

  • @tomaszkantoch4426
    @tomaszkantoch4426 4 года назад

    Everything getting more complicated for no reason... modules..packages..who gives a shit . PHP can do it alone!

  • @debanjanbarman7212
    @debanjanbarman7212 4 года назад +1

    Good tutorial sir but I already know all the topics so I'm gonna skip the video.

    • @LearnWebCode
      @LearnWebCode  4 года назад +3

      Good deal. After this we'll be learning webpack, and then after that we'll be jumping into the "Server" chapter.

    • @debanjanbarman7212
      @debanjanbarman7212 4 года назад +1

      @@LearnWebCode Please cover advanced webpack configuration also.