- Notifications
You must be signed in to change notification settings - Fork0
Tiny C webserver with resource adaption features
License
dottorblaster/grocery
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tiny C webserver with resource adaption features.
To execute grocery you need:
- A Linux kernel
- GLibC or similar (muslc is fine, for Void/Alpine users)
- TheImageMagick suite
If you want compile grocery from its source code, you only needmake
andgcc
. Of course if you want to build a grocery container from scratch you need Docker.
It's dead simple. You just need to run the container mounting a directory as thewww
volume. Let's say you have afiles
folder in your current working directory:
$ sudo docker run -d -P -p 8080:8080 -v$(pwd)/files:/grocery/www dottorblaster/grocery
All you need is inMakefile
. After building the test image withmake build_docker_test
, you can run that withmake docker_test
. Then, you can restart the container to reflect code changes as the image rebuilds the whole application as the entry point.
If you got all your dependencies ready, just build the webserver and run it:
$ make$ ./grocery 8080
Grocery will be listening onlocalhost:8080
.
You need:
- A
www
directory in your cwd as grocery will attempt to read files from that - An empty
cache
directory in the cwd, as grocery will use it as a persistency layer for the caching logic.
About
Tiny C webserver with resource adaption features