title: Cloudkit JS && Node JS
body: <p>I'm currently trying to perform server side connection to iCloud Server using the new CloudKit JS from Apple. According to the WWDC 2015 "CloudKit JS and Web Service", since CloudKit JS is a pure JS framework, you can use it in all JS environnements such as node JS. </p>
  
  <p>I copied the source code of CloudKit JS from <a href="https://cdn.apple-cloudkit.com/ck/1/cloudkit.js" rel="noreferrer">https://cdn.apple-cloudkit.com/ck/1/cloudkit.js</a> and pasted it in a file named "cloudkit.js". Here is a demo of what I tried : </p>
  
  <pre><code>var CloudKit = require("/some/folders/cloudkit.js")
  
  function demoPerformQuery() {
    CloudKit.configure({
        containers: [{
      containerIdentifier: 'myContainerIdentifier',
      apiToken: 'myAPIToken',
      environment: 'development'
        }]
      })
  
    var container = CloudKit.getDefaultContainer();
    var publicDB = container.publicCloudDatabase;
  
    publicDB.performQuery({recordType: 'Items'}).then(function(response){
      // never called :-(
    })
  }
  
  var express = require('express')
  
  var app = express()
  
  app.get("/", function(){
    demoPerformQuery()
  })
  
  var server = app.listen(8080, function () {
    console.log("server launched")
  })
  </code></pre>
  
  <p>CloudKit seems to be correctly set up since all the functions are correctly called. But the callback of performQuery is never called. Why ? </p>
  
  <p>Is there someone who already succeed  to configure CloudKit JS in an server environnement ? </p>
  
  <p>Thanks in advance</p>