UNPKG

1.06 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var BaseModule = /** @class */ (function () {
4 function BaseModule() {
5 }
6 BaseModule.prototype.mount = function (config) {
7 if (this.controllers) {
8 config.controllersFolders.unshift(this.controllers);
9 }
10 if (this.middlewares) {
11 config.middlewaresFolders.unshift(this.middlewares);
12 }
13 if (this.translation) {
14 config.translationFolders.unshift(this.translation);
15 }
16 if (this.views) {
17 config.viewFolders.unshift(this.views);
18 }
19 if (this.public) {
20 config.publicFolders.unshift(this.public);
21 }
22 if (this.entities) {
23 config.db.entities.unshift(this.entities + "/*.entity.js");
24 }
25 if (this.migrations) {
26 config.migrationsFolders.unshift(this.migrations);
27 }
28 };
29 BaseModule.prototype.onDatabaseConnected = function () { };
30 return BaseModule;
31}());
32exports.default = BaseModule;