How to Connect Node js to PostgreSQL Database and Fetch data

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • This video explains how to connect Node.js to PostgreSQL database and fetch data step by step
    Node.js Tutorials Steps - www.kindsonthe...
    Node.js Tutorial Videos - bit.ly/2Qmyp0o
    How to Connect Node.js to MySQL here - • How to Connect Node js...
    My websites
    www.kindsontheg...
    www.munonye.com
    www.datarmatics...
    Learn Programming by joining International Computer Programmers here:
    👉 / 1447709731988533
    Feel free to connect with me
    ❤️ Facebook: / kindsonm
    ❤️ Instagram: / kindsonthegius
    ❤️ LinkedIn: / kindson
    ❤️ Twitter: / kindsonm
    Your support can help me improve my content:
    ✅ Buy me a coffee: www.buymeacoff...
    ✅ Support me on Patreon: / kindsonthegenius

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

  • @Ptaszqq
    @Ptaszqq 2 года назад +39

    Simple and quick without unnecessary talking. Thank you, love it :)

  • @edmundhampton5625
    @edmundhampton5625 2 года назад +5

    This just saved me a whole load of time and stress, thanks for the great little tutorial!

  • @neoTriny
    @neoTriny 10 дней назад +1

    Simple & quick. Thanks 🎉

  • @k-c
    @k-c 10 месяцев назад +1

    Thank you. Appreciate how well you were able to explain this so simply.

  • @ІлляКаплан-с9ж
    @ІлляКаплан-с9ж 3 года назад +2

    Thank you very much, I was looking for this information for almost a day

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

    Man, I Like your videos, appreciate your work.

  • @brianbriansen4131
    @brianbriansen4131 2 года назад +3

    Thank you. I love you go straight to the point, really great tutorial.

  • @amithbhagat
    @amithbhagat 4 месяца назад +1

    Thanks for the concise and relevant explanation 🙏

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

    Perfect man, Thank you.

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

    Thank you, looked on some other they overcomplicated stuff. This is right to the point. !

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

    Thank you, great video 🙏

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

    This was a great video. Thank you!

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

    bad boy, you just got a subscriber

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

    great tutorial thank you soo much! very much appreciated.

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

    Thank you so much! Huge help.

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

    awesome video it worked, could i have the link of the video where you show how to remove and add data in database?

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

      Yes, sure ruclips.net/video/HO5iiDaZO2E/видео.html

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

      @@KindsonTheTechPro thanks

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

    Thank you Kindson!

  • @maratatasan9185
    @maratatasan9185 2 года назад +2

    Great tutorial, thanks man! Straight to the point!

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

    Using your example, how would you save the res.rows to a variable that is accessible through an export?

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

      Hi Josh, did you ever figure this out? Im a student working on a full stack project and had this exact same question.

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

      @@duckblast unfortunately not. I was doing it to check on alternative solutions. I never got a response on this comment

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

      @@duckblast not sure this is still useful but, Ideally, you should export an async function that runs this query and returns the rows.

    • @cardosoexotics
      @cardosoexotics 8 месяцев назад

      The returned rows are an array of row objects, you should make an async function which returns this array and then you can use parsing to separate and use the rows accordingly

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

    What to do if I have installed postgres on azure vm and I want to connect from nodejs?

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

    Hello, do you have a playist for this? Thank you

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

    How do I specify the.env in the environment variable for GitHub actions for the postgreSQL db instance on AWS!

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

    hello sir, I have an error said that client.connect is not function i tried to fix it but then i have another error says that "Cannot read properties of undefined (reading 'query')" I couldnt found any solution

  • @AK-fb7zn
    @AK-fb7zn 2 года назад +1

    Did you connect to a table you created on your local machine or is that a remote mock table that postgres has on their website?

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

      I connected to a table I created on my local machine. But the same applies to remote db as well. Why do you ask?

    • @AK-fb7zn
      @AK-fb7zn 2 года назад

      @@KindsonTheTechPro Because I tried what you did and get "relation "users" does not exist"

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

    thank you so much!

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

    I want my data(audio, video,text formats) from Postgres DB to save on google drive, how can I do it? any reference you can give, will be very helpful

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

    Hi sir can you explain how to compare Excel data and database data whether both have same records or not using pg database

  • @siddheshb.kukade4685
    @siddheshb.kukade4685 2 месяца назад +1

    thank you.

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

    really great !

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

    Well done. Thank you!

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

    Perfect. Thanks sir...

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

    for those confused why the code wont end its "client.end();"

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

    When installing pg I get "6 high severity vulnerabilities" while "npm audit fix --force" command wont work.

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

    Absolute legend, thank you for this video. Subscribed :)

  • @aravindhprabhu3028
    @aravindhprabhu3028 2 года назад +2

    instead of showing the results in console can please tell how to display in browser?

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

      Yes...but that is a different topic as you need an UI engine (Angular, React, Thymeleaf)...You can check through this playlist ruclips.net/video/FzNqL3dxEwc/видео.html

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

    Thank you

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

    Hi, will this work for React too? If not, can you please make a video for connecting React to Postgresql pleasee

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

    How can I call/execute pgpsql script file (*sql) in node js?

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

    holy shit, you just made my auth error disappear. Thank you!

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

    For once, the software is actually really useful

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

    Hi Sir I am getting issue for the host in connecting to postgres

  • @rajputchiragsingh5929
    @rajputchiragsingh5929 6 месяцев назад +1

    client.end() is the right way to end connection

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

    Alright your method is so much easier but what about who use "sequelize" what's the difference

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

    My results is undefined what did I do???

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

    How Do I use that data within a search bar ?

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

    Error: The server does not support SSL connections. i keep getting this error

  • @NoName-ks7op
    @NoName-ks7op Год назад

    Man I get the ECONNRESET error, I don't know how to fix it

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

    think you think you think you

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

    moving from sqlserver/mysql to postgresql I think postgresql is complicated for no reason

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

    okay so it's easy to console.log the data. So far i've not found a way to output the data to a variable.

    • @cardosoexotics
      @cardosoexotics 8 месяцев назад +1

      The returned rows are an array of row objects, you should make an async function which returns this array and then you can use parsing to separate and use the rows accordingly

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

    I fucking love you

  • @Pivok_App
    @Pivok_App Месяц назад +1

    man you really have to work on your typing skills rather than coding! :/

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

      I guess they are all the same 😊
      Feedback noted though. Thanks.

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

    広めてください」、

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

    Hi Looking for the help: Error: Not run migration 1686731015110_table-comment is preceding already run migration 1685564807291_table-comments

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

    Great Job! Thank you

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

    Thank you

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

    I am getting Error: Connection terminated everytime.

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

    thank you