From 54cf5a072fb3899ebe3abc7ab92d029584d84590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 1 Oct 2019 18:22:13 +0200 Subject: [PATCH] Improve naming --- app.js | 4 ++-- app/server.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index f131da42..061f9839 100755 --- a/app.js +++ b/app.js @@ -86,9 +86,9 @@ if (global.settings.statsd) { } const statsClient = StatsClient.getInstance(global.settings.statsd); -const serverFactory = require('./app/server'); +const createServer = require('./app/server'); -const server = serverFactory(statsClient); +const server = createServer(statsClient); const listener = server.listen(global.settings.node_port, global.settings.node_host); listener.on('listening', function() { console.info("Using Node.js %s", process.version); diff --git a/app/server.js b/app/server.js index 51baedb2..61ed537e 100644 --- a/app/server.js +++ b/app/server.js @@ -17,7 +17,7 @@ process.env.PGAPPNAME = process.env.PGAPPNAME || 'cartodb_sqlapi'; require('./utils/date_to_json'); // jshint maxcomplexity:9 -module.exports = function serverFactory (statsClient) { +module.exports = function createServer (statsClient) { const app = express(); const redisPool = new RedisPool({ name: 'sql-api',