@nsshunt/stsconfig 1.6.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/stsconfig.js +53 -27
package/package.json
CHANGED
package/stsconfig.js
CHANGED
|
@@ -49,7 +49,7 @@ const defconfig =
|
|
|
49
49
|
,poolSize: (process.env.POOL_SIZE === undefined ? 20 : parseInt(process.env.POOL_SIZE))
|
|
50
50
|
// Maximum number of CPUs (incl. logical processors) to use within the Microservice.
|
|
51
51
|
// Use -1 to use all available within the runtime container. Each CPU will spawn a node work thread.
|
|
52
|
-
,useCPUs: (process.env.MAX_CPU === undefined ? -1 :
|
|
52
|
+
,useCPUs: (process.env.MAX_CPU === undefined ? -1 : parseFloat(process.env.MAX_CPU))
|
|
53
53
|
// Automatically re-spawn a worker thread if one dies.
|
|
54
54
|
,respawnOnFail: (process.env.RESPAWN === undefined ? false : (process.env.RESPAWN === "true" ? true : false ))
|
|
55
55
|
// Default number of entries to create for a fresh database.
|
|
@@ -112,47 +112,47 @@ const defconfig =
|
|
|
112
112
|
,cspassword: (process.env.CS_PASSWORD === undefined ? "K6TestUserPassword" : process.env.CS_PASSWORD)
|
|
113
113
|
*/
|
|
114
114
|
|
|
115
|
-
// STSREST01 Server
|
|
115
|
+
// STSREST01 Server endpoint
|
|
116
116
|
,rest01endpoint: (process.env.REST01_ENDPOINT === undefined ? "http://localhost" : process.env.REST01_ENDPOINT)
|
|
117
|
-
// STSREST01 Server
|
|
117
|
+
// STSREST01 Server port (listen port for the service)
|
|
118
118
|
,rest01hostport: (process.env.REST01_HOST_PORT === undefined ? "3000" : process.env.REST01_HOST_PORT)
|
|
119
|
-
// STSREST01 Server
|
|
119
|
+
// STSREST01 Server port (client port to access the service)
|
|
120
120
|
,rest01port: (process.env.REST01_PORT === undefined ? "3000" : process.env.REST01_PORT)
|
|
121
|
-
// STSREST01 Server
|
|
122
|
-
,rest01apiroot: (process.env.REST01_APIROOT === undefined ? "/stsrest01/v1/
|
|
123
|
-
// STSREST01 Server
|
|
121
|
+
// STSREST01 Server endpoint
|
|
122
|
+
,rest01apiroot: (process.env.REST01_APIROOT === undefined ? "/stsrest01/v1/im" : process.env.REST01_APIROOT)
|
|
123
|
+
// STSREST01 Server username email
|
|
124
124
|
,rest01email: (process.env.REST01_EMAIL === undefined ? "K6TestUser@sts" : process.env.REST01_EMAIL)
|
|
125
|
-
// STSREST01 Server
|
|
125
|
+
// STSREST01 Server username password
|
|
126
126
|
,rest01password: (process.env.REST01_PASSWORD === undefined ? "K6TestUserPassword" : process.env.REST01_PASSWORD)
|
|
127
127
|
// STSREST01 Service Name
|
|
128
128
|
,rest01servicename: (process.env.REST01_SERVICE_NAME === undefined ? "STSRest01" : process.env.REST01_SERVICE_NAME)
|
|
129
129
|
// STSREST01 Service Version
|
|
130
130
|
,rest01serviceversion: (process.env.REST01_SERVICE_VERSION === undefined ? "1.0.0" : process.env.REST01_SERVICE_VERSION)
|
|
131
131
|
|
|
132
|
-
//
|
|
133
|
-
,
|
|
134
|
-
//
|
|
135
|
-
,
|
|
136
|
-
//
|
|
137
|
-
,
|
|
138
|
-
//
|
|
139
|
-
,
|
|
140
|
-
//
|
|
141
|
-
,
|
|
142
|
-
//
|
|
143
|
-
,
|
|
144
|
-
|
|
145
|
-
// Auth Server
|
|
132
|
+
// STS Instrument Manager Server endpoint
|
|
133
|
+
,imendpoint: (process.env.IM_ENDPOINT === undefined ? "http://localhost" : process.env.IM_ENDPOINT)
|
|
134
|
+
// STS Instrument Manager Server port (listen port for the service)
|
|
135
|
+
,imhostport: (process.env.IM_HOST_PORT === undefined ? "3001" : process.env.IM_HOST_PORT)
|
|
136
|
+
// STS Instrument Manager Server port (client port to access the service)
|
|
137
|
+
,import: (process.env.IM_PORT === undefined ? "3001" : process.env.IM_PORT)
|
|
138
|
+
// STS Instrument Manager Server endpoint
|
|
139
|
+
,imapiroot: (process.env.IM_APIROOT === undefined ? "/stsinstrumentmanager/v1" : process.env.IM_APIROOT)
|
|
140
|
+
// STS Instrument Manager Server username email
|
|
141
|
+
,imemail: (process.env.IM_EMAIL === undefined ? "K6TestUser@sts" : process.env.IM_EMAIL)
|
|
142
|
+
// STS Instrument Manager Server username password
|
|
143
|
+
,impassword: (process.env.IM_PASSWORD === undefined ? "K6TestUserPassword" : process.env.IM_PASSWORD)
|
|
144
|
+
|
|
145
|
+
// Auth Server endpoint
|
|
146
146
|
,asendpoint: (process.env.AS_ENDPOINT === undefined ? "http://localhost" : process.env.AS_ENDPOINT)
|
|
147
|
-
// Auth Server
|
|
147
|
+
// Auth Server host port (listen port for the service)
|
|
148
148
|
,ashostport: (process.env.AS_HOST_PORT === undefined ? "3002" : process.env.AS_HOST_PORT)
|
|
149
|
-
// Auth Server
|
|
149
|
+
// Auth Server port (client port to access the service)
|
|
150
150
|
,asport: (process.env.AS_PORT === undefined ? "3002" : process.env.AS_PORT)
|
|
151
|
-
// Auth Server
|
|
151
|
+
// Auth Server endpoint
|
|
152
152
|
,asapiroot: (process.env.AS_APIROOT === undefined ? "/stsauth/v1" : process.env.AS_APIROOT)
|
|
153
|
-
// Auth Server
|
|
153
|
+
// Auth Server username email
|
|
154
154
|
,asemail: (process.env.AS_EMAIL === undefined ? "K6TestUser@sts" : process.env.AS_EMAIL)
|
|
155
|
-
// Auth Server
|
|
155
|
+
// Auth Server username password
|
|
156
156
|
,aspassword: (process.env.AS_PASSWORD === undefined ? "K6TestUserPassword" : process.env.AS_PASSWORD)
|
|
157
157
|
// STSAuth Service Name
|
|
158
158
|
,asservicename: (process.env.AS_SERVICE_NAME === undefined ? "STSAuth" : process.env.AS_SERVICE_NAME)
|
|
@@ -196,6 +196,32 @@ const defconfig =
|
|
|
196
196
|
// Use secure cookies option when passing back cookies from STS services (such as STSAuth service).
|
|
197
197
|
// This setting will be ignore for production mode. In production mode services will always use secure cookies.
|
|
198
198
|
,useSecureCookies: (process.env.USE_SECURE_COOKIES === undefined ? false : (process.env.USE_SECURE_COOKIES === "true" ? true : false ))
|
|
199
|
+
|
|
200
|
+
,keepAlive: (process.env.KEEP_ALIVE === undefined ? true : (process.env.KEEP_ALIVE === "true" ? true : false ))
|
|
201
|
+
// Reference: https://nodejs.org/api/http.html#class-httpagent
|
|
202
|
+
// keepAlive <boolean> Keep sockets around even when there are no outstanding requests, so they can be used for future requests without having to reestablish a
|
|
203
|
+
// TCP connection. Not to be confused with the keep-alive value of the Connection header. The Connection: keep-alive header is always sent when using an agent
|
|
204
|
+
// except when the Connection header is explicitly specified or when the keepAlive and maxSockets options are respectively set to false and Infinity, in which
|
|
205
|
+
// case Connection: close will be used. Default: false.
|
|
206
|
+
|
|
207
|
+
,maxSockets: (process.env.MAX_SOCKETS === undefined ? 10 : parseInt(process.env.MAX_SOCKETS))
|
|
208
|
+
// Reference: https://nodejs.org/api/http.html#class-httpagent
|
|
209
|
+
// maxSockets <number> Maximum number of sockets to allow per host. If the same host opens multiple concurrent connections, each request will use new socket until the
|
|
210
|
+
// maxSockets value is reached. If the host attempts to open more connections than maxSockets, the additional requests will enter into a pending request queue, and will
|
|
211
|
+
// enter active connection state when an existing connection terminates. This makes sure there are at most maxSockets active connections at any point in time,
|
|
212
|
+
// from a given host. Default: Infinity.
|
|
213
|
+
|
|
214
|
+
,maxTotalSockets: (process.env.MAX_TOTAL_SOCKETS === undefined ? 20 : parseInt(process.env.MAX_TOTAL_SOCKETS))
|
|
215
|
+
// Reference: https://nodejs.org/api/http.html#class-httpagent
|
|
216
|
+
// maxTotalSockets <number> Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
|
|
217
|
+
|
|
218
|
+
,maxFreeSockets: (process.env.MAX_FREE_SOCKETS === undefined ? 256 : parseInt(process.env.MAX_FREE_SOCKETS))
|
|
219
|
+
// Reference: https://nodejs.org/api/http.html#class-httpagent
|
|
220
|
+
// maxFreeSockets <number> Maximum number of sockets per host to leave open in a free state. Only relevant if keepAlive is set to true. Default: 256.
|
|
221
|
+
|
|
222
|
+
,timeout: (process.env.TIMEOUT === undefined ? 10000 : parseInt(process.env.TIMEOUT))
|
|
223
|
+
// Reference: https://nodejs.org/api/http.html#class-httpagent
|
|
224
|
+
// timeout <number> Socket timeout in milliseconds. This will set the timeout when the socket is created.
|
|
199
225
|
}
|
|
200
226
|
|
|
201
227
|
// Preference order is YAML file then .env file
|