Template of a fully separated rails API and AngularJS client with CORS