Welcome to the Blogging Platform API! This project provides a powerful RESTful API for creating, managing, and interacting with captivating blog content. Whether you're a seasoned blogger or just starting your journey, this API has all the features you need to create an engaging blogging experience.
- CRUD Operations: Seamlessly create, read, update, and delete blog posts with ease.
- Comments: Foster engaging discussions by allowing users to leave comments on blog posts.
- Search Functionality: Easily find relevant blog posts using the powerful search feature.
- Pagination: Enhance performance and user experience with built-in pagination.
- User Authentication: Ensure security and privacy with user authentication for authorized access.
-
Clone the Repository:
git clone https://github.com/JoseMiracle/BLOG.git
-
Navigate to the Project Directory:
cd BLOG
-
Configure Docker Compose:
Open the
docker-compose.yml
file and make any necessary adjustments to match your environment, such as ports or environment variables. -
Run Docker Compose:
docker-compose up
-
Explore the API:
Once Docker Compose has finished setting up the environment, you can access the API endpoints using tools like Postman or curl at
http://localhost:8000
.
-
Clone the Repository:
git clone https://github.com/JoseMiracle/BLOG.git
-
Navigate to the Project Directory:
cd BLOG
-
Install Dependencies:
pip install -r requirements.txt
-
Apply Migrations:
python manage.py migrate
-
Run the Development Server:
python manage.py runserver
-
Explore the API:
Access the API endpoints using tools like Postman or curl at
http://localhost:8000
.USE THE POSTMAN DOCS:
https://documenter.getpostman.com/view/28107778/2sA3Bt3pyn
Authentication in this application is based on JSON Web Tokens (JWT). To access protected endpoints, include the JWT token in the Authorization
header as follows:
Authorization: Bearer <jwt-token>
To obtain a JWT token, send a POST
request to the /api/accounts/sign-in/
endpoint with valid user credentials. The response will include an access token and a refresh token. Access tokens are short-lived and can be used for authentication, while refresh tokens can be used to obtain new access tokens.
Special thanks to SkillsForge for giving me the task, I have been able to learn new things.