Skip to content

This is my first attempt at building a personal blog. It allows users to create, edit, and delete posts, as well as interact through comments. The project is built using Node.js, Express, MongoDB, and EJS for templating. It features user authentication, post management, and a simple, responsive design.

Notifications You must be signed in to change notification settings

Mohamadrezash204/Personal-blog

Repository files navigation

Personal Blog

Welcome to my personal blog repository! This project is a web application designed to share my thoughts, experiences, and articles on various topics.

Features

  • User Authentication: Secure login and registration system.
  • Post Management: Create, edit, and delete blog posts.
  • Comment System: Engage with readers through comments.
  • Responsive Design: Optimized for both desktop and mobile devices.

Technologies Used

  • Backend: Node.js with Express framework.
  • Frontend: EJS templating engine.
  • Database: MongoDB for data storage.
  • Styling: CSS for design and layout.

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Mohamadrezash204/Personal-blog.git
    cd Personal-blog
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    • Create a .env file in the root directory.
    • Add the following variables:
      PORT=3000
      MONGODB_URI=your_mongodb_connection_string
      SESSION_SECRET=your_session_secret
      
  4. Start the application:

    npm start

    The application will be accessible at http://localhost:3000.

Usage

  • Home Page: View a list of all blog posts.
  • Post Details: Click on a post to read the full content and comments.
  • Create Post: If authenticated, create new blog posts.
  • Edit/Delete Post: Manage your posts with edit and delete options.
  • Comment: Engage with posts by adding comments.

Contributing

I welcome contributions to enhance this project. To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add YourFeature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

License

This project is open-source and available under the MIT License.

Contact

For any questions or suggestions, feel free to reach out:

About

This is my first attempt at building a personal blog. It allows users to create, edit, and delete posts, as well as interact through comments. The project is built using Node.js, Express, MongoDB, and EJS for templating. It features user authentication, post management, and a simple, responsive design.

Resources

Stars

Watchers

Forks