From 0d2eba47ec1c460791663268324d01b5d372ac2d Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Sat, 28 May 2016 15:17:46 +0200 Subject: [PATCH] Fix paths --- index.js | 2 +- src/app.js | 8 ++++---- src/route/hkp.js | 2 +- src/route/rest.js | 2 +- src/service/public-key.js | 6 +++--- src/service/user-id.js | 4 ++-- test/integration/app-test.js | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/index.js b/index.js index 8fb0edb..52f7bca 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ if (cluster.isMaster) { setTimeout(() => cluster.fork(), 5000); }); } else { - require('./src/worker'); + require('./src/app'); } // diff --git a/src/app.js b/src/app.js index 1621b47..efc4fed 100644 --- a/src/app.js +++ b/src/app.js @@ -26,10 +26,10 @@ const openpgp = require('openpgp'); const nodemailer = require('nodemailer'); const Mongo = require('./dao/mongo'); const Email = require('./dao/email'); -const UserId = require('./ctrl/user-id'); -const PublicKey = require('./ctrl/public-key'); -const HKP = require('./routes/hkp'); -const REST = require('./routes/rest'); +const UserId = require('./service/user-id'); +const PublicKey = require('./service/public-key'); +const HKP = require('./route/hkp'); +const REST = require('./route/rest'); let mongo, email, userId, publicKey, hkp, rest; diff --git a/src/route/hkp.js b/src/route/hkp.js index 81f0874..542cbe5 100644 --- a/src/route/hkp.js +++ b/src/route/hkp.js @@ -18,7 +18,7 @@ 'use strict'; const parse = require('co-body'); -const util = require('../ctrl/util'); +const util = require('../service/util'); /** * An implementation of the OpenPGP HTTP Keyserver Protocol (HKP) diff --git a/src/route/rest.js b/src/route/rest.js index 84cf84f..f27e217 100644 --- a/src/route/rest.js +++ b/src/route/rest.js @@ -18,7 +18,7 @@ 'use strict'; const parse = require('co-body'); -const util = require('../ctrl/util'); +const util = require('../service/util'); /** * The REST api to provide additional functionality on top of HKP diff --git a/src/service/public-key.js b/src/service/public-key.js index 89cdef5..6085472 100644 --- a/src/service/public-key.js +++ b/src/service/public-key.js @@ -30,16 +30,16 @@ const util = require('./util'); const DB_TYPE = 'publickey'; /** - * A controller that handlers PGP public keys queries to the database + * A service that handlers PGP public keys queries to the database */ class PublicKey { /** - * Create an instance of the controller + * Create an instance of the service * @param {Object} openpgp An instance of OpenPGP.js * @param {Object} mongo An instance of the MongoDB client * @param {Object} email An instance of the Email Sender - * @param {Object} userid An instance of the UserId controller + * @param {Object} userid An instance of the UserId service */ constructor(openpgp, mongo, email, userid) { this._openpgp = openpgp; diff --git a/src/service/user-id.js b/src/service/user-id.js index 1b41a87..365d428 100644 --- a/src/service/user-id.js +++ b/src/service/user-id.js @@ -31,12 +31,12 @@ const DB_TYPE = 'userid'; /** - * A controller that handles User ID queries to the database + * A service that handles User ID queries to the database */ class UserId { /** - * Create an instance of the controller + * Create an instance of the service * @param {Object} mongo An instance of the MongoDB client */ constructor(mongo) { diff --git a/test/integration/app-test.js b/test/integration/app-test.js index 05201ea..8738383 100644 --- a/test/integration/app-test.js +++ b/test/integration/app-test.js @@ -5,7 +5,7 @@ require('co-mocha')(require('mocha')); // monkey patch mocha for generators const request = require('supertest'); const fs = require('fs'); -describe.skip('Koa HTTP Server (worker) Integration Tests', function() { +describe.skip('Koa App (HTTP Server) Integration Tests', function() { this.timeout(20000); let app, pgpKey1; @@ -13,7 +13,7 @@ describe.skip('Koa HTTP Server (worker) Integration Tests', function() { before(function *() { pgpKey1 = fs.readFileSync(__dirname + '/../key1.asc', 'utf8'); global.testing = true; - let init = require('../../src/worker'); + let init = require('../../src/app'); app = yield init(); });