MySQL Node.js Express

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

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

  • @tye-gehring
    @tye-gehring Год назад +40

    I've watched tons of different coding tutorials, this was by far one of my favorites. You do an amazing job and I hate to see that you haven't added anything in the last few months. Please keep it up, you are very good at explaining things.

  • @danielmadison4451
    @danielmadison4451 11 месяцев назад +16

    What is clean code? Hard to define, but you know it when you see it. THIS is CLEAN CODE. Thanks for showing all of us how it's done.

  • @fluffybubble6872
    @fluffybubble6872 Год назад +24

    This is one of the best tutorials about using MySQL with Node in youtube. I really enjoyed watching your tutorial and gained a lot of usefull knowledge about topic. You really did a great job !

  • @gabexd39
    @gabexd39 Год назад +5

    If you see this please pin it or comment and pin your comment.
    For anyone who gets an error at
    You have to write "type": "module" in package.json like he did at the beginning of the video, apparently that lets you use "await" without requring to be inside an async function.
    Also, async works in Express 4 as well, you don't need version 5 to use it.

    • @Fishamble
      @Fishamble Год назад +1

      Thanks. That had me confused.

  • @TheChad9909
    @TheChad9909 Год назад +17

    This tutorial is amazing! Very straightforward

  • @phantom3612
    @phantom3612 2 месяца назад +7

    I can't even wrap my head around on how you packed this much of AMAZING content in such a small video. Hats off to you.

    • @vityamv
      @vityamv Месяц назад

      I can't even wrap my head around on how he used await outside async scope

    • @testuser-i9e
      @testuser-i9e 23 дня назад

      @@vityamv top level await

  • @Qubit313
    @Qubit313 5 месяцев назад +1

    Thankyou sir loved your video! 🥰

  • @garonross1934
    @garonross1934 Год назад +4

    I just get this error when i run the code at 5:01...
    const result = await pool.query("SELECT * FROM users");
    ^^^^^
    SyntaxError: await is only valid in async functions and the top level bodies of modules

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

      I get the same issue. im not sure how he is not getting the same error. the createpool doesnt seem to be an async function.

    • @refluent2
      @refluent2 Год назад +1

      It is in an asynchronous function. When declaring the function, he specified ‘async function getNotes() {‘

    • @gabexd39
      @gabexd39 Год назад +2

      You have to write "type": "module" in package.json like he did at the beginning of the video, apparently that lets you use "await" without requring to be inside an async function.

  • @agresiv0
    @agresiv0 2 года назад +7

    Awesome tutorial man, great explanation and good at sharing best practices, some just do stuff without explaining, thank you

  • @HashimWarren
    @HashimWarren Год назад +6

    Fantastic, to-the-point tutorial. Thank you!

  • @koopa9815
    @koopa9815 Год назад +5

    Thanks so much! I LOVE LOVE LOVE how you explain the context of why we write the code a certain way. Helps me out so much knowing background info and prevents me from just following along too blindly!

  • @harumasikuchannel
    @harumasikuchannel Год назад +1

    if you're having a problem with using the Promise API -> await can only be used in an asynchronous function
    use the module type instead to import 'mysql'
    -> 2:08

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

      using common js ive tried to do require(mysql2/promise) but it still doesnt work

  • @davidmd5329
    @davidmd5329 Год назад +2

    All your tutorials are great to follow on practice without missing out............Awesome attribute you have got!!

  •  27 дней назад

    Savage! 28 minutes of mindblowing coding, thx dude!

  • @rohitvijayan9151
    @rohitvijayan9151 2 месяца назад

    PLEASE HELP MEEEE
    Can someone help me with this error:
    (intermediate value) is not iterable
    router.get('/academic-years', async (req, res) => {
    try {
    const [rows] = await db.query(`
    SELECT academic_year FROM students GROUP BY academic_year HAVING COUNT(*) > 0;
    `);
    console.log(rows);
    const academicYears = rows.map(row => row.academic_year);
    res.json(academicYears);
    // ... rest of the code
    } catch (error) {
    console.error(error.message); // Log the specific error message
    res.status(500).send('Error fetching academic years: ' + error.message); // Inform client with details
    }
    });
    I am not able to use map method to get the unique records since the result is a object what should do?

  • @joseph5413
    @joseph5413 Год назад +1

    delete query was missing

  • @Axellse
    @Axellse Год назад +1

    How does this only have 50000 views?????

  • @DR.ID123
    @DR.ID123 Год назад +1

    The whole day I have watched your video and finnally solved my issue

  • @knockstar1
    @knockstar1 Месяц назад

    i can't get it to import express correctly the module it's using is a path to microsoft typescript 5.5 but i have express installed and in my package.json i just can't get it to work

  • @iamexrossssss9
    @iamexrossssss9 10 месяцев назад +1

    you're so pretty omg

  • @richhaskell150
    @richhaskell150 Месяц назад

    Amazingly succinct and helpful. You answered all my questions. Thanks

  • @Kamil505
    @Kamil505 10 месяцев назад

    why am I getting RangeError: Maximum call stack size exceeded when I'm trying to access a route from my browser?

  • @Abdallah_Ismail
    @Abdallah_Ismail 5 месяцев назад

    Leave a comment?, bro I just subscribed and u have my respect. Thank you

  • @caracaxa1
    @caracaxa1 2 года назад +1

    Awesome video. Would like to see one using same languages plus react, and make a full app login and register users, storing the users login information on http only cookies. Show menu links if user is logged in or not.

  • @ToddSotheren-u8b
    @ToddSotheren-u8b 7 месяцев назад +2

    Thank god someone can actually explain this clearly, comprehensively and concisely - everything I needed to know and nothing I didn't - much appreciated mate 👍

  • @thefirebuilds
    @thefirebuilds 8 дней назад

    fantastic thank you. I got my app to work just like yours, pretty cool. Please slow down for us newbs :)

  • @phillipmartinez4683
    @phillipmartinez4683 Месяц назад

    Great video, thank you. This was exactly what I was looking for.

  • @arafatsage8415
    @arafatsage8415 Год назад +1

    This is the best video on the face of this earth

  • @kavindudilshan8818
    @kavindudilshan8818 9 месяцев назад

    this video is very helpful for me i was looking an video that teach sql and express and start databse and this is what exacly i am looking for if you can give a video baout how to use orm like Drizzle and prisma ✌✌🥰

  • @tomasavendanozacarias5205
    @tomasavendanozacarias5205 11 дней назад

    when i tried the basic queries part it resulted in the only response i was getting was "Promise {pending}" could anyone help me with this?

  • @mashablair2854
    @mashablair2854 Год назад +2

    I love this!! especially the voice of the instructor -- I can listen to it all day! 😀
    i was afraid of mysql (connecting it to some front-end code) for a long time and this is super helpful. thank you.

  • @andreguimaraes-bq7fd
    @andreguimaraes-bq7fd 6 месяцев назад

    for some reason everything i the video worked but the index.js file inside the mysql2. In the file there syntax errors about "requests not defined". Did i do something wrong along the way or does this happen when you deply it on live server

  • @yicongsui3263
    @yicongsui3263 Месяц назад

    clear, concise and helpful. Thanks a lot for this nice demonstration, Sam.

  • @JohanJurado-is4dx
    @JohanJurado-is4dx 3 месяца назад

    you're amazing, thank you for the video and fro giving such a good explanation.

  • @AmirhusainZarrati
    @AmirhusainZarrati 4 месяца назад

    fantastic ! clear right to the point code , thank you so much . btw how long it took to become this expert 😅 you exactly know what to do in any scenario,

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

    I am facing an error in using promise and await, There is an error in console saying, I should use async keyword as well.

  • @nri_raj
    @nri_raj 9 месяцев назад

    So clean code wow, subscribed your channel

  • @harshabayyaram
    @harshabayyaram Месяц назад

    Hello sir, what if I have a team and we need to use the same database while development then what should I use for a common db for all of us

  • @Miz-je3hb
    @Miz-je3hb Месяц назад

    great video, very simple and detailed, thank you

  • @devtech125
    @devtech125 5 месяцев назад

    I still wonder how you are using the await keyword outside async function without error

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

    Hey can someone explain the ? mark reason. I can’t seem to wrap my mind around it

  • @rahmounioussama1624
    @rahmounioussama1624 4 месяца назад

    Thanks for the video man, it was helpful for me

  • @ananthavenkateswarlu5627
    @ananthavenkateswarlu5627 2 месяца назад

    Great content, comprehensive enough, good pace 🙂

  • @CoolestPossibleName
    @CoolestPossibleName 10 месяцев назад

    How to work with MySQL database in the docker container

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

    Thank u. I more understand English talking

  • @yazeedarifin6708
    @yazeedarifin6708 9 месяцев назад

    does the pool closes its connection after the query was completed?

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

    what is the command to select all the function, when he was exporting them

  • @sullyzafar83
    @sullyzafar83 2 месяца назад

    how would you connect to the mssql rather than mysql

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

    Great video for mysql and express v5

  • @huyhoangngo582
    @huyhoangngo582 Год назад +1

    I've been watching a lot of tutorials on connecting MySQL to VSCode and using ExpressJS to implement it. None of the videos gave me a clear idea of what to do. But when I watched your video, you basically made everything clear to me. Just wanted to say thanks for the instructions and keep up the good work.

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

    any one tell me the extension for code auto complete.TIA

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

    could you extend this tutiorial with a try/catch acid transaction?

  • @Gadrawingz
    @Gadrawingz 19 дней назад

    SHORT BUT ALL-IN-ONE

  • @xiebenson
    @xiebenson 3 месяца назад

    thanks for sharing. nice tutorial.

  • @Fran-mq4mu
    @Fran-mq4mu Месяц назад

    Man, you don't even know how this video helped me, thank you so much for the didactics and for keeping the language simple for those who aren't natives!

  • @DelaCruzJhanaMaeL.
    @DelaCruzJhanaMaeL. 4 месяца назад

    sabi ni classmate, panoorin daw kita. edi nice!

  • @AnjaliMishra-ec6kb
    @AnjaliMishra-ec6kb 2 месяца назад

    Which tool are you using to develop code

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

    Hey, Thanks for putting this out but I am getting this error 'Access denied for user 'root'@'localhost' (using password: YES)". What could I be doing wrong?

  • @realti-l3h
    @realti-l3h 3 месяца назад

    gonna implement this but with postgres

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

    Hey Sam and others,
    const result = await pool.query('SELECT * FROM notes');
    This results empty array for the first array of arrays. Can anyone help me.

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

    what extension are you using that suggests you everytime autocompletion? A whole good query suggested as autocompletion and you used it. Are you kind to tell me which extension are you using please?

  • @matthewdavidson3117
    @matthewdavidson3117 Месяц назад

    Absolutely amazing! So much knowledge passed through in less than 30 mins. Please keep building and keep making vids

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

    I found an application in production and I have been tasked with creating an admin module for it. The DB is already hosted somewhere using PHPMyAdmin (I’m not sure if this statement is correct). How would I connect to it, assuming I have the IP address and the login credentials? Thanks

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

    Hello Sam, whenever I console logged @5:15, I get SyntaxError: await is only valid in async functions. How do i get past this?

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

    Hi! Maybe you should have said from the start that this is not a beginner friendly kind of thing. Really struggled to understand anything, but that's what you get for being a beginner in this field. Will come back to this video once I get a better grasp of MySQL. Thank you for now!

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

    I'm curious about "const notes = await getNotes( )" works successfully, "await" syntax should be inside the async function, isn't it?

  • @andrewcenteno3462
    @andrewcenteno3462 Месяц назад

    As an experienced dev, who mainly works with mongoDb, this video was amazing sir. You earned a sub

  • @PureLandTourTourandTravels
    @PureLandTourTourandTravels 4 месяца назад

    This tut helped a lot.Nice💯

  • @empaguia
    @empaguia 4 месяца назад

    how about the html file?
    how to connect that?

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

    When I run the first query as shown in your video with a similar setup, I got an error on the console that says await can only be used inside a function and top-level bodies of modules. I'm using Common JS module System, is this be a problem for this error?

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

    Hey Bro, What is the VSC extension that shows you the suggestions as you start to type allowing you to quickly complete your code??? 🤔

  • @Antel_007
    @Antel_007 3 месяца назад

    watching this pretty late but I enjoyed every bit of it. I really love how you made the everything connect and how information can be accessed and modified through different channels. great work. Thanks for this.

  • @zeeshanzafar4545
    @zeeshanzafar4545 9 месяцев назад

    Thanks for saving my time

  • @arindam-karmakar
    @arindam-karmakar 3 месяца назад

    Really clean, really nice!

  • @JesseFowlerDesigner
    @JesseFowlerDesigner 9 месяцев назад

    Sam thank you! So informative and easy to follow. I couldn't find the mySQL install video in the description but I did figure it out. Still didn't know where you were running mySQL commands, I had to use MySQL Workbench.

  • @CodeWithBehram7497
    @CodeWithBehram7497 6 месяцев назад

    The content i was looking for great video much appericiate❤

  • @fernandoli6743
    @fernandoli6743 4 месяца назад

    Does it cover the transaction concept?

  • @Raquelleist
    @Raquelleist 6 месяцев назад

    Amazing video, this helped so much and was very easy to follow. Thank you!

  • @chriskiesel5360
    @chriskiesel5360 11 месяцев назад +1

    Fantastic! I really enjoyed this honestly, I kept pausing and rewinding the clip over and over and not because it was hard to grasp rather was your delivery, absolute fire . I am so happy for accidentally coming across your channel you're a real one Sam, Cheers.

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

    hello sir!
    i have used mongodb atlas for db and I just simply go to railway and deploy my app
    but how do i do this with mysql? cause mysql db is on my machine right? how to deploy mysql and nodejs server

  • @dineshkum4r
    @dineshkum4r Месяц назад

    thnks buddy

  • @nielsvandervelden3063
    @nielsvandervelden3063 Год назад +2

    Your tutorials are fantastic! Would love to see a tutorial on AWS lambda functions and API gateway.

  • @govindbisen388
    @govindbisen388 10 месяцев назад

    how to, which mysql to download?

  • @rajat_171
    @rajat_171 5 месяцев назад

    That's the best tutorial for which i was looking for.
    Understood each and every line. Thanks Sam

  • @pasinduprabhath917
    @pasinduprabhath917 Год назад +1

    Very Helpful and thank you for the nice video ❤

  • @stellarhades9517
    @stellarhades9517 4 месяца назад

    Thank you so much, I couldn't find anything specific to what I am trying to do, so finding this was a godsend! Interesting ideas and ways to do this

  • @A2_26_Tushar_kalaskar
    @A2_26_Tushar_kalaskar 5 месяцев назад

    that was great class for me today

  • @dearerenigma3331
    @dearerenigma3331 Год назад +1

    Thanks a lot, you save my first web project !!!
    You are the goat
    Your video is better than 99% of online formation

  • @lahiru9000
    @lahiru9000 2 месяца назад

    I learned lots of things from this video than any other coding video. Thank you very much!

  • @ukaszurbanski4469
    @ukaszurbanski4469 5 месяцев назад

    Is this MVVM archutecture?

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

    Can you make a video about Passport-Local using NodeJS and MySQL ? Great video!

  • @Alex-wg9bi
    @Alex-wg9bi 2 месяца назад

    Great video! As a computer science student who has studied these concepts/frameworks in class, this was a fantastic streamlined refresher!

  • @lovelyalicekim
    @lovelyalicekim 4 месяца назад

    I really love your tutorial which is straightforward and clear. Especially mentioning like why it is the better way to write code. Super helpful!!

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

    Dunno How I glad I felt at the very beginning of this tutorial, ever better jajaja dunno how to describe How I felt after complete these almost 30 minutes.
    Just to try to be accurate, It was in-depth, updated, straightforward MySQL, Node.js and Express master Class...!!! Thank so much!!
    Sorry I'm not english native speaker But I did my best in order to express my self!!!
    In a nutshell it was spotless tutorial!!!
    Thanks Dude! Thanks Sam Meech-Ward!!!!!!!!

  • @udoigweuchechukwu3295
    @udoigweuchechukwu3295 11 месяцев назад

    This is straight to the point. However, how do we close connections after a successful query?

  • @khaoulaouifaya585
    @khaoulaouifaya585 11 месяцев назад

    thanks you so much we love youuuu

  • @belvindaronedymayayakotho2862
    @belvindaronedymayayakotho2862 10 месяцев назад

    Thank u a lot for your help. I was looking for many weeks how to connect mysql database from node Js. Now i did it !

  • @費毖鄑
    @費毖鄑 Год назад

    Hi~ can I ask a basic question, how you use await without async ? I have thw same code with you but can't run in my vscode

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

      i solved the problem by changing " type" property to "module" in package.json

  • @Hemantraghav-vp3ff
    @Hemantraghav-vp3ff 5 месяцев назад

    It is very helpful video for those looking for 'how to connect node.js app to Mysql ". To-the-point tutorial.

  • @JusmeJr93
    @JusmeJr93 18 дней назад

    💯