This is a simple blog api that allows users to create , read, update and delete posts. It uses Django & DjangoRestFramework as the server framework with Postgres for database management.
git clone https://github.com/Cellou404/AwesomeBlogAPI.gitpython3 -m venv venvsource venv/bin/activatepip install -r requirements.txttouch .envFill the .env file with the following values:
SECRET_KEY=your_secret_key
DEBUG=True
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your_db_host
DB_PORT=your_db_portpython manage.py makemigrations # you can specify the app name. e.g. python manage.py makemigrations blog
python manage.py migratepython manage.py createsuperuserpython manage.py runserverhttp://127.0.0.1:8000/api/v1/blog/posts/| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/blog/posts/ | Get all posts |
| GET | /api/v1/blog/posts/{id}/ | Get a post by id |
| POST | /api/v1/blog/posts/ | Create a post |
| PUT | /api/v1/blog/posts/{id}/ | Update a post by id |
| DELETE | /api/v1/blog/posts/{id}/ | Delete a post by id |
This project is licensed under the MIT License - see the LICENSE.md file for details.
