@nlpjs/express-api-server
Advanced tools
Comparing version 4.21.1 to 4.22.0
{ | ||
"name": "@nlpjs/express-api-server", | ||
"version": "4.21.1", | ||
"version": "4.22.0", | ||
"description": "Express API Server", | ||
@@ -28,3 +28,3 @@ "author": { | ||
"dependencies": { | ||
"@nlpjs/core": "^4.21.1", | ||
"@nlpjs/core": "^4.22.0", | ||
"cors": "^2.8.5", | ||
@@ -36,3 +36,3 @@ "express": "^4.17.1" | ||
}, | ||
"gitHead": "2efbb63222a8d8bcd4f70d41437b0fd8ebf7dcb5" | ||
"gitHead": "725dcf52c1b521e4575edb51917690ce051b9434" | ||
} |
@@ -45,4 +45,13 @@ /* | ||
this.app.use(express.json()); | ||
this.loadComplements(); | ||
return this.app; | ||
} | ||
loadComplements() { | ||
for (let i = 0; i < this.plugins.length; i += 1) { | ||
this.app.use(this.plugins[i]); | ||
const plugin = this.plugins[i]; | ||
logger.debug(`Loading plugin: ${plugin.name}`); | ||
this.app.use(plugin); | ||
} | ||
@@ -61,3 +70,2 @@ if (this.settings.serveBot) { | ||
} | ||
return this.app; | ||
} | ||
@@ -64,0 +72,0 @@ } |
2257977
8899
Updated@nlpjs/core@^4.22.0