0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/modules/caddyhttp/starlarkmw/example/caddy.json
Matthew Holt 95ed603de7
Improve godocs all around
These will be used in the new automated documentation system
2019-12-23 12:45:35 -07:00

19 lines
No EOL
480 B
JSON

{
"apps": {
"http": {
"servers": {
"MY_SERVER": {
"listen": [":3001"],
"routes": [
{
"handle": {
"handler": "starlark",
"script": "def setup(r):\n\t# create some middlewares specific to this request\n\ttemplates = loadModule('http.handlers.templates', {'file_root': './includes'})\n\tmidChain = execute([templates])\n\ndef serveHTTP (rw, r):\n\trw.Write('Hello world, from Starlark!')\n"
}
}
]
}
}
}
}
}