diff --git a/ExpressAPI/src/app.ts b/ExpressAPI/src/app.ts new file mode 100644 index 0000000000000000000000000000000000000000..9ac8a0989d073e63e5ab1e160d3c889ff6d26dde --- /dev/null +++ b/ExpressAPI/src/app.ts @@ -0,0 +1,17 @@ +// Read from the .env file +// ATTENTION : This line MUST be the first of this file +require('dotenv').config(); + +import WorkerRole from './process/WorkerRole'; +import ClusterManager from './process/ClusterManager'; +import API from './express/API'; + + +(new ClusterManager([ { + role : WorkerRole.API, + quantity : ClusterManager.CORES, + restartOnFail: true, + loadTask : () => { + return new API(); + } +} ])).run();