Table of Contents
I wanted to know how login authentication works with a backend.
- Passport for authentication
- bcrypt for encryption
- MongoDB schema with Mongoose
- API testing with Postman
- Handlebars for views
To get a local copy up and running follow these simple steps.
-
Get a free API Key from MongoDB from Here
-
Clone the repo
git clone https://github.com/NatC02/loginRegistrationNode
-
Install NPM packages
npm install
-
Enter your API in
config/keys.js
dbPassword = "mongodb+srv://YOUR_USERNAME_HERE:" + encodeURIComponent("YOUR_PASSWORD_HERE") + "@CLUSTER_NAME_HERE.mongodb.net/YOUR_DATABASE_NAME_HERE?retryWrites=true"; module.exports = { mongoURI: dbPassword, }; const API_KEY = "ENTER YOUR API";
List of resources I found helpful and want to give credit to. I was looking to learn to further cement my knowledge of backend fundamentals.