Foodculator
is a web service, written in C++, that allows you to record all your favourite food recipes, catalog your tableware, and, most importantly, calculate nutrition of a dish you are cooking today.
$ sudo apt-get install g++ make binutils cmake libssl-dev libboost-system-dev zlib1g-dev libsqlite3-dev
$ mkdir build && cd build
$ cmake .. && make -j4
$ foodculator path/to/folder/static /tmp/database.db
/version
http handler exposes the value ofVERSION
env variable.PORT
env variable is used to override the port (1234
by default).
$ docker build .
$ docker run -p 1234:1234 --rm -d \
--label=com.centurylinklabs.watchtower.stop-signal=SIGKILL \
-v /root/foodprod:/data \
--name foodculator \
docker.pkg.github.com/lelika1/foodculator/foodculator:latest
Foodculator
builds with CMake. All its external dependencies are defined as git submodules for this repo.
We use:
- yhirose/cpp-httplib - to start an HTTP server from within a C++ process.
- dropbox/json11 - for working with JSON in C++
- fmtlib/fmt - for better & faster string formatting.
- google/googletest - for writing unit tests
libsqlite3
- it should be installed on your system such that we can statically link with it.
NOTE: It is recommended to put foodculator
behind some reverse proxy like nginx
that would terminate https and do authentication, if needed.
Icon is made by wanicon from www.flaticon.com