diff --git a/ExpressAPI/src/app.ts b/ExpressAPI/src/app.ts index 487035a9d069e91c7a147e0a94219137a9f31cc5..b1eb7d2dd46eb1f8d64c9c61ccd4805cb6be4d58 100644 --- a/ExpressAPI/src/app.ts +++ b/ExpressAPI/src/app.ts @@ -1,5 +1,6 @@ require('./InitialImports'); // ATTENTION : These lines MUST be the first of this file +import SharedConfig from './shared/config/SharedConfig'; import WorkerRole from './process/WorkerRole'; import ClusterManager from './process/ClusterManager'; import API from './express/API'; @@ -9,9 +10,13 @@ import HttpManager from './managers/HttpManager'; HttpManager.registerAxiosInterceptor(); -(new ClusterManager([ { - role : WorkerRole.API, - quantity : ClusterManager.CORES, - restartOnFail: true, - loadTask : () => new API() -} ])).run(); +if ( SharedConfig.production ) { + (new ClusterManager([ { + role : WorkerRole.API, + quantity : ClusterManager.CORES, + restartOnFail: true, + loadTask : () => new API() + } ])).run(); +} else { + (new API()).run(); +} diff --git a/ExpressAPI/src/shared b/ExpressAPI/src/shared index 75fedb26c47bb6f707725307a79a45a13e62496d..985c0b6a5dcb640404e5cf5fc91978215f961e3b 160000 --- a/ExpressAPI/src/shared +++ b/ExpressAPI/src/shared @@ -1 +1 @@ -Subproject commit 75fedb26c47bb6f707725307a79a45a13e62496d +Subproject commit 985c0b6a5dcb640404e5cf5fc91978215f961e3b