-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
46 lines (38 loc) · 1.18 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
45
46
/**
* Index File for @ostdotcom/base
*/
'use strict';
const rootPrefix = '.',
Logger = require(rootPrefix + '/lib/logger/custom_console_logger'),
PromiseContext = require(rootPrefix + '/lib/promise_context/promise_context'),
PCQueueManager = require(rootPrefix + '/lib/promise_context/promise_queue_manager'),
responseHelper = require(rootPrefix + '/lib/formatter/response_helper'),
InstanceComposer = require(rootPrefix + '/lib/InstanceComposer');
// 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,
OSTPromise: {
Context: PromiseContext,
QueueManager: PCQueueManager
},
responseHelper: responseHelper,
InstanceComposer: InstanceComposer
};
/*
OSTBase = require("./index");
//Test Logger
logger = new OSTBase.Logger("Test");
logger.testLogger()
//Test PromiseQueueManager
PQM = OSTBase.OSTPromise.QueueManager;
//Run these one by one.
PQM.Examples.allReject();
PQM.Examples.allResolve();
PQM.Examples.allReject();
PQM.Examples.allTimeout();
PQM.Examples.executorWithParams();
PQM.Examples.maxZombieCount();
*/