⭕ Overview
Hello everyone, welcome back. In this part of the video, we're going to use a PostgreSQL database system to store user information, specifically login data, to complete the session management for this Node.js application.
In our previous video, we covered the basics of creating sessions using a simple process to log in users. We demonstrated how logging in allows users to access previously hidden content, which becomes hidden again upon logging out. This time, we'll go deeper by allowing users to register and saving their username, email, and password to a PostgreSQL database.
First, I'll show you how to set up your PostgreSQL database. We'll navigate to the PostgreSQL database system, where I have a database under my DB with schemas. In the public schema, we have a table called "users." This users table has four columns. I'll walk you through the setup of this simple users table.
I'll demonstrate how to access the properties of the table, despite some screen display challenges. Under the properties section, you can configure the table to include the necessary fields: ID, username, email, and password.
Next, we move on to the Node.js application. We'll modify the code to connect to our PostgreSQL database. This involves setting up the database connection, creating necessary SQL queries for inserting user data, and handling user registration. We'll ensure that the username, email, and password are stored securely in the database.
By the end of this tutorial, you will have a fully functional Node.js application that uses PostgreSQL for session management and user data storage. This setup provides a solid foundation for building robust web applications.
If you find this video helpful, please give it a thumbs up, share it with your friends, and subscribe to my channel for more tutorials and insights into programming. Your support helps me create more content to assist you in your learning journey. Thank you for watching!
Episode 1: Create sessions to show/hide content using the express-sessions and cookie-parser modules.
Episode 2: Creating login, logout and registration pages and hash/unhash passwords into/from a PostgreSQL database.
Episode 3: Hash/unhash passwords into/from a MongoDB database.
⭕ Chapters
0:00 - Introduction
⭕ About me
I am a Web instructor and author for Linkedin Learning (formerly Lynda.com), Packt, E-C Council, Udemy, and MC Press.
⭕ Visit my site: https://christianhur.com
⭕ My complete online training courses:
☑️ REST APIs & AJAX Operations Using Node, Express, and jQuery: https://www.udemy.com/course/rest-api...
☑️ Build Clean and Secure PHP Web Apps From Scratch: https://www.udemy.com/course/build-cl...
☑️ Angular 9 New Features: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Flask: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Django & Angular 8: https://www.packtpub.com/web-developm...
☑️ Angular 7 New Features: https://www.packtpub.com/web-developm...
☑️ The DOM in JavaScript, jQuery, AngularJS, and React : / the-dom-in-javascript-jquery-angularjs-and...
☑️ Building JSF Web Applications with Java EE 7: / building-jsf-web-applications-with-java-ee-7
☑️ Troubleshooting Vue.js: https://www.packtpub.com/application-...
⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press.
☑️ Link: https://www.mc-store.com/collections/...
Watch video Managing State in Node.js Using express-session and bcrypt (Episode 2) online, duration hours minute second in high quality that is uploaded to the channel Christian Hur 25 August 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 307 times and liked it 7 visitors.