Step by Step Javascript and Postgres Tutorial using node-postgres

Published: 26 January 2019
on channel: Hussein Nasser
118,969
2k

💻 More Software engineering videos    • Software Engineering by Example  

In this video, we will learn how to connect to a Postgres database from Javascript. We will learn how to perform queries on a table. We will go through an Insert example and learn how to do transactions. You can through jump codes table of content to jump to areas of the code of interest to you.

Requirements
1. NodeJS 10 or later,    • Turn your laptop into a Web Server to serv...  
2. PostgresSQL database    • Spinning multiple Postgres instances and P...  
3. Visual Studio Code https://code.visualstudio.com/
4. Using #node-postgres npm library https://node-postgres.com/

Reference Videos
Atomic Transactions

Jump Codes Table of Content
0:00 Intro
02:50 Creating new NodeJS Project
06:40 The node-postgres npm library
10:40 Connecting to the postgres database (promises)
13:30 Executing queries (promises)
18:10 Executing queries with parameters (promises)
22:00 Executing Insert statement (DML) (Promises)
26:22 Connecting to postgres (Async/await)
37:00 The Results object of the query
39:40 Executing Transactions in Javascript (Begin, Commit/Rollback)

Source Code
https://github.com/hnasr/javascript_p...

Enjoy 😉

Stay Awesome!
Hussein


On this page of the site you can watch the video online Step by Step Javascript and Postgres Tutorial using node-postgres with a duration of hours minute second in good quality, which was uploaded by the user Hussein Nasser 26 January 2019, share the link with friends and acquaintances, this video has already been watched 118,969 times on youtube and it was liked by 2 thousand viewers. Enjoy your viewing!