Posts.com is a simple and user-friendly blog application where users can register, log in, and share their thoughts through posts. Users can create, edit, and delete their own posts as well as comment on others' posts.
- User Authentication: Users can register and log in using their credentials.
- Create Posts: Logged-in users can create new blog posts.
- Edit Posts: Users can edit their own posts.
- Delete Posts: Users can delete their own posts.
- Comment on Posts: Users can comment on other users' posts.
- Responsive Design: The application is designed to be responsive, providing a seamless experience across various devices.
- Frontend: HTML, CSS, Bootstrap
- Backend: Node.js, Express.js
- Database: MySQL
- Templating Engine: EJS
- Authentication: JWT (JSON Web Tokens)
- File Upload: Multer
-
Clone the repository:
git clone https://github.com/your-username/Posts.com.git
-
Install the dependencies:
cd Posts.com npm install -
Set up environment variables:
- Create a
.envfile in the root directory. - Add your PORT, MySQL database URL, JWT secret, and other necessary environment variables as shown below:
- Create a
#Server Port
PORT
#JWT secret for authentication
JWT_SECRET
# MySQL Database Configuration
Host
Db
Db_PORT
User
Password
# Cloudinary Configuration for image uploads
Cloud_name
API_key
API_secret- Run the application:
npm start
- Visit
http://localhost:${process.env.Port}in your browser to view the application.
- Register for a new account or log in with existing credentials.
- Create a new blog post using the "Add a Post" button.
- Edit or delete your posts from the homepage.
- Comment on other user's posts by clicking on a post and adding your comment.
Contributions are welcome! Please feel free to submit a Pull Request.





