The goal behind this repository is to provide some Caddyfile examples and also provide some sample other files like certificates which are not automatic (very basic and simple though).
Simply clone this repository and make sure caddy is installed. On macOS, you can install caddy from brew:
brew install caddy
To launch caddy and use a configuration file (an exampel is available in this repo), type the following command:
caddy -conf pathto/caddyconf
While I can provide support for all my other repository here on GitHub, I will not provide support for this one. If the script does not work for you, feel free to debug it by yourself as I won't help you.