Closed alxbauer closed 6 years ago
Hi thanks for the feedback,
We recently had several discussions (#74, #82, #100) about the structure of the code using the SDK. The recommended setup is now to install drivers via NPM, this means they are now isolated and have their own package.json
separate from the "server" package.json
.
Since the neeoSdkOption is only used at the top level there is a separation between the driver source and the server/client:
/myServerFolder/package.json
(my server settings here)/myServerFolder/node_modules/driverA/*
(driver's source, isolated from package json settings above)/myServerFolder/node_modules/driverB/*
I believe this addresses the separation of user settings/code and driver source code. Also the new CLI (https://github.com/NEEOInc/neeo-sdk-toolkit/tree/master/cli) supports env variables as an alternative to package.json settings.
Thank you for the detailed answer. I understand the concept. I will adapt my code to and test it.
In my opinion the
package.json
is not a good place for configuration options. Thepackage.json
is normaly part of the source and will be updated from time to time, so it should not contain user specific options. I would prefer a separate configuration file, e.g.neeo-sdk.json
or something like that.