app module moved to right place

This commit is contained in:
Daniel García Aubert 2015-12-03 18:33:17 +01:00
parent d31d496a2e
commit c6bae6d951
22 changed files with 27 additions and 27 deletions

2
app.js
View File

@ -78,7 +78,7 @@ if ( ! global.settings.base_url ) {
var version = require("./package").version;
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
app.listen(global.settings.node_port, global.settings.node_host, function() {
console.log(
"CartoDB SQL API %s listening on %s:%s with base_url %s (%s)",

View File

@ -24,7 +24,7 @@ var LRU = require('lru-cache');
process.env.PGAPPNAME = process.env.PGAPPNAME || 'cartodb_sqlapi';
// override Date.toJSON
require('../utils/date_to_json');
require('./utils/date_to_json');
// jshint maxcomplexity:21
function App() {
@ -153,23 +153,23 @@ function App() {
// basic routing
var GenericController = require('./generic_controller');
var GenericController = require('./controllers/generic_controller');
var genericController = new GenericController();
genericController.register(app);
var QueryController = require('./query_controller');
var QueryController = require('./controllers/query_controller');
var queryController = new QueryController(metadataBackend, tableCache, statsd_client);
queryController.register(app);
var CacheStatusController = require('./cache_status_controller');
var CacheStatusController = require('./controllers/cache_status_controller');
var cacheStatusController = new CacheStatusController(tableCache);
cacheStatusController.register(app);
var HealthCheckController = require('./health_check_controller');
var HealthCheckController = require('./controllers/health_check_controller');
var healthCheckController = new HealthCheckController();
healthCheckController.register(app);
var VersionController = require('./version_controller');
var VersionController = require('./controllers/version_controller');
var versionController = new VersionController();
versionController.register(app);

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
describe('app.auth', function() {

View File

@ -14,7 +14,7 @@
*/
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
var querystring = require('querystring');
var _ = require('underscore');

View File

@ -27,7 +27,7 @@ it('does not hang server', function(done){
var db_port_backup = global.settings.db_port;
global.settings.db_host = 'localhost';
global.settings.db_port = sql_server_port;
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
step(
function sendQuery() {
var next = this;

View File

@ -2,7 +2,7 @@ require('../../helper');
require('../../support/assert');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('assert');
var querystring = require('querystring');

View File

@ -2,7 +2,7 @@ require('../../helper');
require('../../support/assert');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('assert');
var querystring = require('querystring');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var querystring = require('querystring');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var querystring = require('querystring');
var libxmljs = require('libxmljs');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var querystring = require('querystring');
var shapefile = require('shapefile');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var sqlite = require('sqlite3');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var querystring = require('querystring');

View File

@ -1,6 +1,6 @@
require('../../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../../support/assert');
var querystring = require('querystring');
var _ = require('underscore');

View File

@ -30,7 +30,7 @@ it('aborts request', function(done){
var db_port_backup = global.settings.db_port;
global.settings.db_host = 'localhost';
global.settings.db_port = sql_server_port;
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var timeout;
step(
function sendQuery() {

View File

@ -2,7 +2,7 @@ require('../helper');
require('../support/assert');
var assert = require('assert');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
describe('health checks', function() {

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
var qs = require('querystring');

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app');
var app = require(global.settings.app_root + '/app/app');
var assert = require('../support/assert');
var qs = require('querystring');
var log4js = require('log4js');

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
var qs = require('querystring');

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
var querystring = require('querystring');

View File

@ -26,7 +26,7 @@ it('after configured milliseconds', function(done){
//console.log("settings:"); console.dir(global.settings);
var timeoutBackup = global.settings.node_socket_timeout;
global.settings.node_socket_timeout = testTimeout;
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
step(
function sendLongQuery() {
var next = this;

View File

@ -10,7 +10,7 @@ describe('transaction', function() {
var server;
before(function(done) {
server = require(global.settings.app_root + '/app/controllers/app')();
server = require(global.settings.app_root + '/app/app')();
server.listen(SERVER_PORT, '127.0.0.1', done);
});

View File

@ -1,6 +1,6 @@
require('../helper');
var app = require(global.settings.app_root + '/app/controllers/app')();
var app = require(global.settings.app_root + '/app/app')();
var assert = require('../support/assert');
var querystring = require('querystring');
var _ = require('underscore');