Blog Management System is a full-stack web application with user authentication, including blog setup, login, logout, and password reset. Registered users can create and set up their own blogs and view all their content on the admin dashboard. Readers can comment on posts and reply to comments. Readers will receive email notifications for replies to their comments using Nodemailer. The web application enables users to perform CRUD operations on their blog content. It is implemented using the Model-View-Controller (MVC) architecture to separate concerns. The application utilizes the Socket.IO library to facilitate real-time updates on posts and comments.
-
Make a
configfolder and add aconfig.jsfile in it. -
Paste the following code in the
config.jsfile:const session_secret = ""; const email_user = ""; const app_password = ""; module.exports = { session_secret, app_password, email_user }
Follow the below steps to configure the file:
- Add a secret session key of your choice in
session_secret. - Add your Gmail address in
email_userto send notifications. - Generate an app password for your Gmail account.
- Instructions can be found at below link: link
- Replace
app_passwordwith the generated app password.
- Add a secret session key of your choice in
-
Open
index.jsfile and locate the following line:mongoose.connect("mongodb://localhost:27017/db_name")
Change
db_nameto the desired name of your database.
-
Run the command
npm installto install the required dependencies. -
Start the server by running the command
node index.js. -
Open the following URL in a web browser: http://localhost:3000/