Add an example in R
Enable CORS requests in the example API service

This allows cross-origin JS requests from other sites.