I'm a selftaught (web) developer. On sunny days, you can find me hiking through the Teutoburg Forest, on rainy days coding or with a good fiction novel in hand.
Conveying the idea of storing passwords in a db looks rather good, but I noticed (at least in the source code), you're not hashing the user's password.
For a productive environment, you might want to consider storing a password hash rather than the raw text in a db. There are plenty of libs to do so, one of which is called bcrypt npmjs.com/package/bcrypt
Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
Conveying the idea of storing passwords in a db looks rather good, but I noticed (at least in the source code), you're not hashing the user's password.
For a productive environment, you might want to consider storing a password hash rather than the raw text in a db. There are plenty of libs to do so, one of which is called bcrypt npmjs.com/package/bcrypt
In this case, there is no need for third-part libraries as there is native node module: nodejs.org/api/crypto.html
Yup! Its necessary to store password in hash form in DB but this tutorial purpose was to teach how to store and retrieve data from DB with Node.js