Magpie backend
cmake | ||
request | ||
response | ||
server | ||
stream | ||
CMakeLists.txt | ||
default.conf | ||
main.cpp | ||
README.md |
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