Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 01:00 UTC
| 1 | { |
| 2 | log { |
| 3 | format append { |
| 4 | wrap json |
| 5 | fields { |
| 6 | wrap "foo" |
| 7 | } |
| 8 | env {env.EXAMPLE} |
| 9 | int 1 |
| 10 | float 1.1 |
| 11 | bool true |
| 12 | string "string" |
| 13 | } |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | :80 { |
| 18 | respond "Hello, World!" |
| 19 | } |
| 20 | ---------- |
| 21 | { |
| 22 | "logging": { |
| 23 | "logs": { |
| 24 | "default": { |
| 25 | "encoder": { |
| 26 | "fields": { |
| 27 | "bool": true, |
| 28 | "env": "{env.EXAMPLE}", |
| 29 | "float": 1.1, |
| 30 | "int": 1, |
| 31 | "string": "string", |
| 32 | "wrap": "foo" |
| 33 | }, |
| 34 | "format": "append", |
| 35 | "wrap": { |
| 36 | "format": "json" |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | }, |
| 42 | "apps": { |
| 43 | "http": { |
| 44 | "servers": { |
| 45 | "srv0": { |
| 46 | "listen": [ |
| 47 | ":80" |
| 48 | ], |
| 49 | "routes": [ |
| 50 | { |
| 51 | "handle": [ |
| 52 | { |
| 53 | "body": "Hello, World!", |
| 54 | "handler": "static_response" |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | ] |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | } |