Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

cleanup configuration options #61

Merged
merged 14 commits into from
Feb 3, 2017
Merged

cleanup configuration options #61

merged 14 commits into from
Feb 3, 2017

Conversation

sat939
Copy link
Contributor

@sat939 sat939 commented Jan 23, 2017

resolves #52

@KalleV
Copy link
Contributor

KalleV commented Jan 23, 2017

@sat939 There is still configuration accessed here: https://github.com/LabShare/services/blob/master/lib/server-utils.js#L35. Could you update the parameters so that services can pass in https configuration from the constructor?

"ServicePath": "",
"HTTPS": {
"PrivateKey": "",
"Certificate": ""
},
"loadServices" : true,
"pattern" : "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sat939 Can you remove pattern, main, and directories from the sample config please?

lib/services.js Outdated
});

this.server = serverUtils.createServer(this._app, this._options.logger);
this._apiLoader = new Loader(this._app, this._options);
this._socketLoader = new SocketIOLoader(this.server, this._options);

console.log(this._options);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sat939 Remove console

"pattern" : "",
"main" : "",
"directories" : [],
"morgan" : {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sat939 Since defaultsDeep doesn't override empty values, I would prefer if the 'morgan' entry was an empty object. That will ensure the default values are used even when the sample config is used as a template.

@KalleV
Copy link
Contributor

KalleV commented Jan 30, 2017

@sat939 Can you update https://github.com/LabShare/services/blob/master/docs/socket-apis.md too since the configuration for establishing P2P socket connections changed?

lib/services.js Outdated
@@ -37,7 +37,9 @@ class Services {
this._isProduction = this._app.get('env') === 'production';
this._options = _.defaultsDeep(options, {
logger,
connections: [],
socket:{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sat939 Changing the option here will require the option handling in https://github.com/LabShare/services/blob/master/lib/api/socket-io-loader.js#L56 to be updated too. It will also require an update to the tests and to the tests in https://github.com/LabShare/storage/blob/master/test/lib/unit/proxy/storage_spec.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up configuration options
3 participants