This is a simple blog website built with the Express framework and MongoDB as the database.
- User-friendly Interface: Clean and intuitive design for a pleasant user experience.
- Create and Publish: Create and publish your blog posts easily.
- Read and Comment: Read posts from other users and leave comments.
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- MongoDB: A NoSQL database for storing blog posts and user data.
- EJS: Embedded JavaScript templates for rendering dynamic content.
- Node.js and npm installed on your machine.
- MongoDB installed locally or a MongoDB Atlas account for a cloud database.
-
Clone the repository:
git clone https://github.com/KshitijTiwari0/Blog.git
-
Navigate to the project directory:
cd blog-website
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory with the following content:PORT=3000 MONGODB_URI=your-mongodb-uri
Replace
your-mongodb-uri
with the connection string for your MongoDB database. -
Start the server:
npm start
-
Open your browser and navigate to http://localhost:3000 to view the blog website.
If you would like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature
. - Commit your changes:
git commit -m 'Add your feature'
. - Push to the branch:
git push origin feature/your-feature
. - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.