Code Monkey home page Code Monkey logo

libre-blog's Introduction

libre-blog

Libre-blog is a blog system. This repository uses the Drogon framework to implement the backend API of libre-blog. The front-end implementation of libre-blog is 👉here.

API List

  • article
    • /blog/articles/{page}
    • /blog/category/{slug}/{page}
    • /blog/tag/{slug}/{page}
    • /blog/user/{id}/{page}
    • /blog/admin/articles/{page}
    • /blog/article/{id}
    • /blog/article/add
    • /blog/article/update
    • /blog/article/delete
  • category
    • /blog/categories
    • /blog/category/{id}
    • /blog/category/add
    • /blog/category/update
    • /blog/category/delete
  • tag
    • /blog/tags/{page}
    • /blog/tag/{id}
    • /blog/tag/add
    • /blog/tag/update
    • /blog/tag/delete
  • user
    • /login
    • /register
    • /user/center
    • /user/update/general-info
    • /user/update/password
    • /users/{page}
    • /user/{id}
    • /user/add
    • /user/update
    • /user/delete
    • /user/role
  • role
    • /roles
  • menu
    • /blog/admin/menu
    • /blog/menu

For more detailed API documentation, please see 👉here.

Setup, Build, and Run

Setup Environment

This project is developed on Debian GNU/Linux 12 (bookworm). You need to install these packages to meet the development environment.

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 libyaml-cpp-dev \
    -y

Then, you need to install the Drogon framework. For more detailed information about the Drogon framework, please see 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 install

This project uses jwt-cpp for token issuing and verification. So, you need to install this library.

git clone https://github.com/Thalhammer/jwt-cpp.git
cd jwt-cpp
mkdir build
cd build
cmake .. && make
sudo make install

Build

1.Create database and data tables

Please see 🛠️here

2.Generate database model code

git clone https://github.com/fansuregrin/libre-blog.git
cd libre-blog/models
dg_ctl create model .

3.Build Executable File

cd libre-blog/
mkdir build
cd build
cmake .. && make

Run

Just run the libre-blog executable file in the build folder.

cd build
./libre-blog

Acknowledgements

  • Drogon: Provides the possibility to build various types of web application server programs.
  • VSCode: Provide an environment for code writing and debugging.
  • ApiPost: Provide API design and debugging functions.

libre-blog's People

Contributors

fansuregrin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.