The Post-Comments Service is a web application built with Flask that enables users to create posts and add comments to existing posts. It offers a user-friendly interface for managing posts and comments stored in a database.
The application follows a client-server architecture:
- Client Side: Utilizes HTML, CSS, and JavaScript to create the user interface.
- Server Side: Implemented with Python and Flask to handle HTTP requests and interact with the database.
- Create new posts with custom text.
- Add comments to existing posts.
- Supports basic text formatting (bold, italics, hyperlinks) in comments.
To set up and run the application locally, follow these steps:
-
Clone the Repository:
git clone <repository-url> cd post-comments-service
-
Install Dependencies:
pip install -r requirements.txt
-
Initialize the Database: Execute the create_tables() function in app.py to create the necessary database tables.
-
Run the Application:
python app.py
-
Access the Application: Open your web browser and navigate to http://127.0.0.1:5000 to access the application.
- Ensure Python is installed on your system.
- The application utilizes an SQLite database, eliminating the need for additional database setup.
- JavaScript enhances the user interface and provides dynamic functionality.
- Python (3.x recommended)
- Flask
- Flask-SQLAlchemy