app module moved to right place
This commit is contained in:
parent
d31d496a2e
commit
c6bae6d951
2
app.js
2
app.js
@ -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)",
|
||||
|
@ -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);
|
||||
|
@ -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() {
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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() {
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user