url:
  r/prime:
    pattern: /$YAMLURL/prime
    handler: FunctionHandler
    kwargs:
      function: rcalc.prime(handler)
      headers:
        Content-Type: application/json

  r/plot.png:
    pattern: /$YAMLURL/plot.png
    handler: FunctionHandler
    kwargs:
      function: rcalc.plot(handler)
      headers:
        Content-Type: image/png
        Cache-Control: max-age=3600

  r/plot_async.png:
    pattern: /$YAMLURL/plot_async.png
    handler: FunctionHandler
    kwargs:
      function: rcalc.plot_async(handler)
      headers:
        Content-Type: image/png
        Cache-Control: max-age=3600

  r/rmarkdown:
    pattern: /$YAMLURL/(.*Rmd)
    handler: FileHandler
    kwargs:
      path: $YAMLPATH
      transform:
        "*.Rmd":
          function: rmarkdown(content, handler)
          headers:
            Content-Type: text/html
            Cache-Control: max-age=3600
