Bookworm-project / BookwormGUI

GUI for a Bookworm web app
MIT License
15 stars 10 forks source link

Specifying host in options.json #27

Closed organisciak closed 8 years ago

organisciak commented 8 years ago

We want the ability to reach APIs in different local locations than cgi-bin/dbbindings.py and on different servers.

I propose that we extend options.json to read a settings.host argument, defaulting to cgi-bin/dbbindings.py if unset. Then, we'd read this argument on this line: https://github.com/Bookworm-project/BookwormGUI/blob/master/static/js/a.js#L572.

Note that for cross-server support, the API will also need to support JSON, which I added as an issue here: https://github.com/Bookworm-project/BookwormDB/issues/94.

organisciak commented 8 years ago

@ramarvab, I updated this in BookwormGUI with commit d2c3b6be1, so if settings.host is set in static/options.json, that will be used to find the API. cc @bmschmidt to let him know.

@ramarvab, I'll merge this into the HTRC branch of BookwormGUI. That's the approach to take for changes that would benefit any Bookworm install: if it's generally useful, put in this repo, then merge the changes to the HTRC-specific branch.