Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 2.65 KB

README.md

File metadata and controls

50 lines (42 loc) · 2.65 KB

Blog-Post

This is my 1st Node.js application. It has following functionalities (find sceenshot by clicking each link).

  1. User Registration (email support)
  2. Login/Logout
  3. Forgot Password (email support)
  4. Reset Password (email support)
  5. View and Edit Profile
  6. Add Blog/Post
  7. View Blog/Post
  8. Add Comment on a Blog/Post
  9. View Comment on a Blog/Post
  10. Account Locking (to prevent brute-force attacks by enforcing a maximum number of failed login attempts)

Technology

  1. Node.js (Server side JS)
  2. Express.js (Web Application Framework)
  3. Mongoose.js (ODM - Object Document Mapper)
  4. MongoDB (Document Database)
  5. NodeMailer.js (Email)
  6. Passport.js (Authentication and Session Management)
  7. Passport-local.js (Local Authentication)
  8. Handlebars.js (Template Engine)
  9. Bootstrap.js (Frontend, UI)
  10. Bootstrap-validator.js (HTML Form validation)

Prerequisites

  1. Insatll Node.js See this for installation steps.
  2. Install MongoDB See this for installation steps.

Installation

  1. Download the project as zip or do a git clone from here
  2. Go to the root dir (Blog-Post).
  3. Use the standard node app installation process to use the application (npm install).
    • This should install all the dependent node-modules from package.json.

Email Setting

The application sends mail for Successful Registration, Forgot Password and Successful Reset Password from gmail only account.

  1. Edit config\keys.js.
  2. Change smtpConfig=>auth with your gmail account email id and password.
  3. Change from: with your gmail account email id in regMailOptions,forgotMailOptions,resetMailOptions.
  4. To disbale email, edit config/keys.js and set disableEmailSending = "no". Note You have to edit your gmail acoount's setting in order to send mail from less secure application. See this for more details.

Start

  1. Usual Mode start (code changes do not reflect on the fly) node app.js
  2. Development Mode Start (code changes reflect on the fly) SET DEBUG=Blog-Post:* & npm run devstart
  3. Open the application in any browser with http://localhost:8080/