Turns form data into JSON and opens a pull request. https://fediblock.org/
This repository has been archived on 2021-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
tastytea a3fca80b29
All checks were successful
continuous-integration/drone/push Build is passing
Update dependencies in readme.
2020-07-02 02:15:30 +02:00
cmake
src Compatibility with older nlohmann-json. 2020-07-02 02:07:52 +02:00
tests Add pull requests via Gitea API. 2020-07-02 00:19:18 +02:00
.clang-format
.drone.yml Add pull requests via Gitea API. 2020-07-02 00:19:18 +02:00
.editorconfig
.gitignore
AUTHORS
CMakeLists.txt Add pull requests via Gitea API. 2020-07-02 00:19:18 +02:00
CODE_OF_CONDUCT.adoc
CONTRIBUTING.adoc
CREDITS Add pull requests via Gitea API. 2020-07-02 00:19:18 +02:00
LICENSE
README.adoc Update dependencies in readme. 2020-07-02 02:15:30 +02:00

fediblock-backend

fediblock-backend turns form data into JSON and opens a pull request on FediBlock/data.

Table of Contents

Usage

nginx config
# […]

location /add {
    include /etc/nginx/fastcgi_params;
    fastcgi_pass    unix:/var/run/cgi-fcgiwrap.socket-1;
    fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend;
    fastcgi_param HOME "/var/lib/nginx"; # When I didn't set it, HOME was /root.
}
Generate SSH key
sudo -u nginx ssh-keygen -t ed25519 -f ~nginx/.local/share/fediblock-backend/ssh_id

Dont forget to add the key to the data repo.

Install

From source

Dependencies

  • Tested OS: Linux

  • C++ compiler with C++17 support (tested: GCC 8/9/10, clang 7/10)

  • CMake (at least: 3.9)

  • cgicc (tested: 3.2)

  • nlohmann-json (tested: 3.7 / 2.1)

  • libgit2 with SSH support (tested: 1.0 / 0.27)

  • libcurl (at least: 7.56)

  • Optional

    • Tests: Catch (tested: 2.5 / 1.10)

    • DEB package: dpkg (tested: 1.19)

    • RPM package: rpm-build (tested: 4.11)

Get sourcecode

git clone https://schlomp.space/FediBlock/backend.git

Compile

mkdir -p build && cd build
cmake ..
cmake --build . -- --jobs=$(nproc --ignore=1)
CMake options:
  • -DCMAKE_BUILD_TYPE=Debug for a debug build.

  • -DWITH_TESTS=YES if you want to compile the tests.

  • -DWITH_CLANG-TIDY=YES to check the sourcecode with clang-tidy while compiling.

  • One of:

    • -DWITH_DEB=YES if you want to be able to generate a deb-package.

    • -DWITH_RPM=YES if you want to be able to generate an rpm-package.

To create a deb or rpm package, run make package after compiling.