Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tiny C webserver with resource adaption features

License

NotificationsYou must be signed in to change notification settings

dottorblaster/grocery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny C webserver with resource adaption features.

Dependencies

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.

Running grocery on 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

Development testing on Docker

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.

Running locally (on Linux)

If you got all your dependencies ready, just build the webserver and run it:

$ make$ ./grocery 8080

Grocery will be listening onlocalhost:8080.

Directories and permissions

You need:

  • Awww directory in your cwd as grocery will attempt to read files from that
  • An emptycache directory in the cwd, as grocery will use it as a persistency layer for the caching logic.

[8]ページ先頭

©2009-2025 Movatter.jp