The documentation for play framework twirl templating engine leaves you with more questions than answers.It is actually pretty terrible. It is more help for those who already know it, than those trying to learn it. Basically reading the docs left me with more questions than answers.
Below I am gathering a list of resources that better explain how the twirl template engine works. Eventually I will write some articles about what I discover. Creating Play Framework template functions (examples) – This does a better job of explaining the basics of template functions. He explains some of their lingo such as “reusable block” that threw me off too.
Making Our First View with Play using Scala – Explaining Basics of twirl templates
CORS Cross origin resource sharing allows you to decide if a script from a domain other than your website/app can access data aka make AJAX calls etc. to your server. For your frontend API you probably want to limit the origin to just your domain. For a developer API you probably want to allow all origins.