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 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() {
|
app.listen(global.settings.node_port, global.settings.node_host, function() {
|
||||||
console.log(
|
console.log(
|
||||||
"CartoDB SQL API %s listening on %s:%s with base_url %s (%s)",
|
"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';
|
process.env.PGAPPNAME = process.env.PGAPPNAME || 'cartodb_sqlapi';
|
||||||
|
|
||||||
// override Date.toJSON
|
// override Date.toJSON
|
||||||
require('../utils/date_to_json');
|
require('./utils/date_to_json');
|
||||||
|
|
||||||
// jshint maxcomplexity:21
|
// jshint maxcomplexity:21
|
||||||
function App() {
|
function App() {
|
||||||
@ -153,23 +153,23 @@ function App() {
|
|||||||
|
|
||||||
// basic routing
|
// basic routing
|
||||||
|
|
||||||
var GenericController = require('./generic_controller');
|
var GenericController = require('./controllers/generic_controller');
|
||||||
var genericController = new GenericController();
|
var genericController = new GenericController();
|
||||||
genericController.register(app);
|
genericController.register(app);
|
||||||
|
|
||||||
var QueryController = require('./query_controller');
|
var QueryController = require('./controllers/query_controller');
|
||||||
var queryController = new QueryController(metadataBackend, tableCache, statsd_client);
|
var queryController = new QueryController(metadataBackend, tableCache, statsd_client);
|
||||||
queryController.register(app);
|
queryController.register(app);
|
||||||
|
|
||||||
var CacheStatusController = require('./cache_status_controller');
|
var CacheStatusController = require('./controllers/cache_status_controller');
|
||||||
var cacheStatusController = new CacheStatusController(tableCache);
|
var cacheStatusController = new CacheStatusController(tableCache);
|
||||||
cacheStatusController.register(app);
|
cacheStatusController.register(app);
|
||||||
|
|
||||||
var HealthCheckController = require('./health_check_controller');
|
var HealthCheckController = require('./controllers/health_check_controller');
|
||||||
var healthCheckController = new HealthCheckController();
|
var healthCheckController = new HealthCheckController();
|
||||||
healthCheckController.register(app);
|
healthCheckController.register(app);
|
||||||
|
|
||||||
var VersionController = require('./version_controller');
|
var VersionController = require('./controllers/version_controller');
|
||||||
var versionController = new VersionController();
|
var versionController = new VersionController();
|
||||||
versionController.register(app);
|
versionController.register(app);
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
|
|
||||||
describe('app.auth', function() {
|
describe('app.auth', function() {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
|
@ -27,7 +27,7 @@ it('does not hang server', function(done){
|
|||||||
var db_port_backup = global.settings.db_port;
|
var db_port_backup = global.settings.db_port;
|
||||||
global.settings.db_host = 'localhost';
|
global.settings.db_host = 'localhost';
|
||||||
global.settings.db_port = sql_server_port;
|
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(
|
step(
|
||||||
function sendQuery() {
|
function sendQuery() {
|
||||||
var next = this;
|
var next = this;
|
||||||
|
@ -2,7 +2,7 @@ require('../../helper');
|
|||||||
require('../../support/assert');
|
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 assert = require('assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ require('../../helper');
|
|||||||
require('../../support/assert');
|
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 assert = require('assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var libxmljs = require('libxmljs');
|
var libxmljs = require('libxmljs');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var shapefile = require('shapefile');
|
var shapefile = require('shapefile');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var sqlite = require('sqlite3');
|
var sqlite = require('sqlite3');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../../helper');
|
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 assert = require('../../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
|
@ -30,7 +30,7 @@ it('aborts request', function(done){
|
|||||||
var db_port_backup = global.settings.db_port;
|
var db_port_backup = global.settings.db_port;
|
||||||
global.settings.db_host = 'localhost';
|
global.settings.db_host = 'localhost';
|
||||||
global.settings.db_port = sql_server_port;
|
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;
|
var timeout;
|
||||||
step(
|
step(
|
||||||
function sendQuery() {
|
function sendQuery() {
|
||||||
|
@ -2,7 +2,7 @@ require('../helper');
|
|||||||
require('../support/assert');
|
require('../support/assert');
|
||||||
|
|
||||||
var assert = require('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() {
|
describe('health checks', function() {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var qs = require('querystring');
|
var qs = require('querystring');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var qs = require('querystring');
|
var qs = require('querystring');
|
||||||
var log4js = require('log4js');
|
var log4js = require('log4js');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var qs = require('querystring');
|
var qs = require('querystring');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ it('after configured milliseconds', function(done){
|
|||||||
//console.log("settings:"); console.dir(global.settings);
|
//console.log("settings:"); console.dir(global.settings);
|
||||||
var timeoutBackup = global.settings.node_socket_timeout;
|
var timeoutBackup = global.settings.node_socket_timeout;
|
||||||
global.settings.node_socket_timeout = testTimeout;
|
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(
|
step(
|
||||||
function sendLongQuery() {
|
function sendLongQuery() {
|
||||||
var next = this;
|
var next = this;
|
||||||
|
@ -10,7 +10,7 @@ describe('transaction', function() {
|
|||||||
|
|
||||||
var server;
|
var server;
|
||||||
before(function(done) {
|
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);
|
server.listen(SERVER_PORT, '127.0.0.1', done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('../helper');
|
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 assert = require('../support/assert');
|
||||||
var querystring = require('querystring');
|
var querystring = require('querystring');
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
|
Loading…
Reference in New Issue
Block a user