diff --git a/config/index.js b/config/index.js index 2ac8f0f9..357bbbd3 100644 --- a/config/index.js +++ b/config/index.js @@ -1,5 +1,5 @@ var f = { - fakeApp: process.env['START_APP'] + autoStartApps: process.env['START_APP'] }; var fs = require('fs'); diff --git a/index.js b/index.js index af3780a8..52b62eae 100644 --- a/index.js +++ b/index.js @@ -643,7 +643,13 @@ function onlineSetup(callback) { Matrix.banner(); //if START_APP is set - if (Matrix.config.fakeApp) Matrix.service.manager.start(Matrix.config.fakeApp); + if (Matrix.config.autoStartApps) { + let appsSplit = Matrix.config.autoStartApps.split(' '); + for (let i = 0; i < appsSplit.length; i++) { + Matrix.service.manager.start(Matrix.config.appsSplit[i]); + } + } + //for tests Matrix.events.emit('matrix-ready');