Ignore:
Timestamp:
03/05/14 22:44:48 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Completed migration to API, without CouchDB proxy.

Move to API is now completed. The full API is password protected, a very
limited API is exposed for respondents, which works with secrets that
are passed in URLs.

Serverside the HTTPResult class was introduced, which is similar to
Promises, but specifically for HTTP. It carries a status code and
response and makes it easier to extract parts of async handling in
separate functions.

Fixed a bug in our schema (it seems optional attributes don't exist but
a required list does). Verification of our schema by grunt-tv4 didn't
work yet. Our schema is organized the wrong way (this is fixable),
but the json-schema schema has problems with simple types and $refs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/server/config/config-couchdb.js

    r479 r487  
    55  ;
    66
    7 var designDocs = require('./couchdb-design-docs');
     7module.exports = function(couchServerURL, dbName, designDocs) {
     8    var server = new CouchDB(couchServerURL);
    89
    9 module.exports = function(couchServerURL) {
    10     var server = new CouchDB(couchServerURL);
     10    if ( !designDocs ) { throw new Error("Forgot to pass design docs to checkCouch."); }
    1111
    1212    console.log("Configuring CouchDB for QED");
     
    1414    return server.get('')
    1515    .then(function(info){
    16         if (info.version !== "1.2.0" ) {
     16        if (info.version !== "1.4.0" ) {
    1717            console.log("Found "+info.version+", only tested with CouchDB 1.2.0");
    1818        } else {
    19             console.log("CouchDB 1.2.0 found");
     19            console.log("CouchDB 1.4.0 found");
    2020        }
    2121    }).then(function(res){
Note: See TracChangeset for help on using the changeset viewer.