Libre-blog is a blogging platform powered by the Drogon framework for its backend API.
- Article
- GET
/articles - GET
/admin/articles - GET
/articles/category/{slug} - GET
/articles/tag/{slug} - GET
/articles/user/{id} - GET
/article/{id} - POST
/admin/article - PUT
/admin/article - DELETE
/admin/article/
- GET
- Category
- GET
/categories - GET
/category/id/{id} - GET
/category/slug/{slug} - POST
/admin/category - PUT
/admin/category - DELETE
/admin/category
- GET
- Tag
- GET
/tags/all - GET
/tags - GET
/tag/id/{id} - GET
/tag/slug/{slug} - POST
/admin/tag - PUT
/admin/tag - DELETE
/admin/tag
- GET
- User
- POST
/login - POST
/register - GET
/admin/user/center - PATCH
/admin/user/general-info - PATCH
/admin/user/password - GET
/admin/users - GET
/user/{id} - POST
/admin/user - PUT
/admin/user - DELETE
/admin/user
- POST
- Role
- GET
/admin/roles
- GET
- Menu
- GET
/admin/menu
- GET
This project is developed on Debian GNU/Linux 12 (bookworm) or Arch Linux. Install the following packages to set up the development environment:
On Debian:
apt install \
g++ gdb libgtest-dev git cmake doxygen \
libjsoncpp-dev uuid-dev zlib1g-dev \
libssl-dev openssl libmariadb-dev libhiredis-dev libc-ares-dev libbrotli-dev \
-yOn Arch:
pacman install \
g++ gdb gtest git cmake doxygen \
jsoncpp util-linux-libs zlib \
openssl mariadb-libs hiredis c-ares brotliNext, install the Drogon framework. For detailed information, refer to the Drogon wiki page.
git clone https://github.com/drogonframework/drogon
cd drogon
git submodule update --init
mkdir build
cd build
cmake ..
make && sudo make installThis project also uses jwt-cpp for token issuing and verification. Install this library as follows:
git clone https://github.com/Thalhammer/jwt-cpp.git
cd jwt-cpp
mkdir build
cd build
cmake .. && make
sudo make installgit clone https://github.com/fansuregrin/libre-blog.git
cd libre-blogRefer to 🛠️here for instructions.
mkdir build
cd build
cmake .. && makeExecute the libre-blog file located in the build folder:
cd build
./libre-blog- Drogon: Enables the creation of various types of web application server programs.
- VSCode: Provides an environment for code writing and debugging.
- ApiPost: Supports API design and debugging.
- DataGrip: Provides a powerful database management tool that simplifies database development and administration.