aboutsummaryrefslogtreecommitdiff
path: root/Caddyfile
blob: 50aec75238fa5be72732686ca5c76c8d2f63ddbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    order cgi before respond
}

(robots) {
	respond /robots.txt <<EOF
		Hey robots :)
		EOF 200
}

http://localhost:8080 {
	root * zig-out

	import robots

	# API server
    cgi /api/* comments/zig-out/bin/comments {
    	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
    }

    # Treat posts as home
    redir / /posts/ temporary

	file_server
}