-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
44 lines (37 loc) · 1.16 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Index File for @truesparrow/base
*/
const rootPrefix = '.',
Logger = require(rootPrefix + '/lib/logger/CustomConsoleLogger'),
PromiseContext = require(rootPrefix + '/lib/promiseContext/PromiseContext'),
PCQueueManager = require(rootPrefix + '/lib/promiseContext/PromiseQueueManager'),
InstanceComposer = require(rootPrefix + '/lib/InstanceComposer'),
ResponseHelper = require(rootPrefix + '/lib/formatter/ResponseHelper');
// Expose all libs here.
// All classes should begin with Capital letter.
// All instances/objects should begin with small letter.
module.exports = {
logger: new Logger(),
Logger: Logger,
CustomPromise: {
Context: PromiseContext,
QueueManager: PCQueueManager
},
responseHelper: ResponseHelper,
InstanceComposer: InstanceComposer
};
/*
Base = require("./index");
//Test Logger
logger = new Base.Logger("Test");
logger.testLogger()
//Test PromiseQueueManager
PQM = Base.CustomPromise.QueueManager;
//Run these one by one.
PQM.Examples.allReject();
PQM.Examples.allResolve();
PQM.Examples.allReject();
PQM.Examples.allTimeout();
PQM.Examples.executorWithParams();
PQM.Examples.maxZombieCount();
*/