Looking for a way to add user management to my site.
Website: Working with Node.js and Express when creating the source project using Express, the app.js file contains the following lines:
app.use('/', routes); app.use('/users', users);
In addition, the users.js file is created in the routes folder. My question is how to manage users, force login and show different views for a regular user / administrator. I want to find a simple example / tutorial.
Storage: When working with MongoDB and mongoose, I noticed that there is a Users folder in the database. I want to save user data (user + password + preference) on MongoDB. What is the way to do this?
Keren source share