Allow cross-origin requests with CORS
Browsers block requests from other origins unless the server allows them. CORS(origin) sets the allowed origins for the whole app: pass an address, a comma-separated list, or nothing to allow every origin (*). Prefix an address with + to add it to the existing list.
CORS('https://app.example.com');exports.install = function() {
ROUTE('GET /api/time/', ($) => $.json({ ok: true }));
};