Caddyfile (482B)
1 { 2 order cgi before respond 3 } 4 5 (robots) { 6 respond /robots.txt <<EOF 7 Hey robots :) 8 EOF 200 9 } 10 11 http://localhost:8080 { 12 root * zig-out 13 14 import robots 15 16 # API server 17 cgi /api/* comments/zig-out/bin/comments { 18 env NOTIFICATION_ADDRESS=martin@mfashby.net SMTP_SERVER=mail.mfashby.net:587 SMTP_USERNAME=comments@mfashby.net SMTP_PASSWORD=foobar DATABASE_URL=postgresql://localhost/comments 19 } 20 21 # Treat posts as home 22 redir / /posts/ temporary 23 24 file_server 25 } 26