-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable features (not just API/constructor parameters, maybe config file?) #38
Comments
re config file: this article might be a good illustration – that can at least help people checking this issue understand how it looks like. |
I would also like to be able to use some of the routes from another server, or add some of my own routes to the streamer server. Here's what I did to make that work with an older version of the streamer: https://github.com/NYPL-Simplified/opds-web-client/blob/master/packages/server/index.js |
@JayPanoz of course I agree with using runtime environment variables, specifically in a pure-server-side situation that is totally sandboxed / controlled by the server operators. However, historically we have relied on a minimal number of |
Thanks @aslagle, useful info! :) Looking at the NYPL Git history ( https://github.com/NYPL-Simplified/opds-web-client/commits/master/packages/server/index.js ), I see that the "server" adaptations were put into place as early as Feb. 2016. To be honest, this is the first time I hear about this (sorry if I have missed conversations). Did you raise any issues about FYI, the current r2-streamer-js/src/http/server.ts Lines 136 to 142 in c1f3ac0
( https://github.com/readium/r2-streamer-js/blob/develop/src/http/server.ts#L136-L142 ) |
Side note: I had a chat with our JelloBooks friends earlier today (including @JayPanoz). They have integration requirements that go beyond improving the API / architecture here and there (such as adding/removing routes, controlling HTTP headers, inserting auth middleware, manipulating the server's internal state ; e.g. load/unload publications, etc.). For example the Related issue: |
PS: I logged a separate issue about HTTP CORS preflight ( |
I think I did mention on some of the calls that I thought the streamer had too many features that made it difficult to use, but since I was only using it for a demo I set up that workaround to only take the part I wanted. My opinion would be that optional features like the sample readers and OPDS routes shouldn't be in this server at all. I'd rather have a simple streamer with a way to add additional features, and maybe a "test app"-style server with the sample readers. The OPDS stuff could get its own package that could optionally be added. |
For example, to disable the built-in sample "readers" (NYPL demo, etc.), HTTP CORS (in some cases they are in fact unwanted), OPDS micro-services, etc. etc.
(there are many optional features, perhaps the server constructor should launch by default with no HTTP route activated, and a convenience method on the server class could implement a baseline suitable for "readium desktop", another for the Heroku/Now.sh online deployment, etc.)
The text was updated successfully, but these errors were encountered: