1
0
forked from blue/pica
Go to file
2023-12-08 19:36:16 +03:00
cmake find fcgi is a module now, a primitive readme 2023-11-29 10:09:11 -03:00
request first couple of requests 2023-11-23 16:57:32 -03:00
response first couple of requests 2023-11-23 16:57:32 -03:00
server first couple of requests 2023-11-23 16:57:32 -03:00
stream Initial setup 2023-11-21 19:19:08 -03:00
CMakeLists.txt find fcgi is a module now, a primitive readme 2023-11-29 10:09:11 -03:00
default.conf add default.conf 2023-12-08 19:36:16 +03:00
main.cpp first couple of requests 2023-11-23 16:57:32 -03:00
README.md find fcgi is a module now, a primitive readme 2023-11-29 10:09:11 -03:00

Pica - Backend for Megpie budgeting app

... some description

Prerequisites

  • fcgi
  • nlohmann_json

Building

$ git clone https://git.macaw.me/blue/pica
$ cd pica
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .

Usage

Webserver

First you need a webserver. In this example I'm going to use apache.

Install apache from your package manager.

Create a file like this in apache config dir (in my case it's /etc/httpd/conf/extra/fcgi-pica.conf)

<Location /pica>
    ProxyPass "unix:/run/pica/pica.sock|fcgi://localhost"
    ProxyPassReverse "http://localhost"
</Location>

Incude this file from apache config file (in my case it's /etc/httpd/conf/httpd.conf)

Include conf/extra/fcgi-pica.conf

Start apache

$ sudo systemctl start httpd

Creating a directory

Next you need to create a directory for pica socket file

# mkdir /run/pica
# chown <your user> /run/pica

Running an app

At this stage we're redy to run an app

$ cd build
$ ./pica