source: Dev/trunk/src/server/bin/heroku.js @ 487

Last change on this file since 487 was 487, checked in by hendrikvanantwerpen, 11 years ago

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 size: 542 bytes
Line 
1var env = require('../env')
2  , configCouch = require('../config/config-couchdb')
3  , designDocs = require('../config/config-couchdb')
4  ;
5
6console.log("Running on",env.couchServerURL);
7
8require('../app').App({
9    couchServerURL: env.couchServerURL,
10    dbName: env.dbName
11}).then(function(app){
12    configCouch(env.couchServerURL,env.dbName,designDocs);
13    return app;
14}).then(function(app){
15    app.listen(env.port, function() {
16        console.log('Listening on port',env.port);
17    });
18}, function(error){
19    console.error(error);
20});
Note: See TracBrowser for help on using the repository browser.