A complete authentication system which can be used as a starter code for creating any new application.
- NodeJS
- Express
- EJS
- MongoDB
- Mongoose
- PassportJS
- Clone the repository
git clone
- Into the project directory
cd nodejs-authentication
- Install dependencies
npm install
-
Add all the constants' values used in this app in a file named '.env' and place that file in root folder
-
Build and run the project
npm start
- Navigate to
http://localhost:8000/
nodejs-auth
├── assets
│ --- ├── css
│ -------- ├── layout.css
├── config
│ --- ├── middleware.js
│ --- ├── mongoose.js
│ --- ├── passport-google-oauth2-strategy.js
│ --- ├── passport-local-strategy.js
├── controllers
│ --- ├── home.js
│ --- ├── user.js
├── models
│ --- ├── user.js
├── routes
│ --- ├── index.js
│ --- ├── home.js
├── views
│ --- ├── partials
│ -------- ├── messages.ejs
│ --- ├── dashboard.ejs
│ --- ├── home.ejs
│ --- ├── layout.ejs
│ --- ├── login.ejs
│ --- ├── register.ejs
├── .gitignore
├── index.js
├── package-lock.json
├── package.json
├── README.md