Skip to content

pass in persistence paths as env variables #60

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

Merged
merged 8 commits into from
Aug 17, 2020

Conversation

cgardens
Copy link
Contributor

What

  • Add unit tests for DefaultConfigPersistence
  • Rely on the jar to locate the schemas
  • Allow passing in the data root for the persistence via env variable

import javax.ws.rs.core.HttpHeaders;
import org.glassfish.hk2.api.Factory;

public class ConfigurationApiFactory implements Factory<ConfigurationApi> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

following suggestion from here https://stackoverflow.com/questions/16216759/dependency-injection-with-jersey-2-0/29275727#29275727. the use of the static field to pass in the param still feels jenky. maybe i'm missing something smarter?

@@ -64,6 +80,6 @@ public void start() throws Exception {
public static void main(String[] args) throws Exception {
LOGGER.info("Starting server...");

new ServerApp().start();
new ServerApp("/Users/charles/code/dataline/data/config").start();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: actually move this into a env variable. i will do this before i merge.

@cgardens cgardens force-pushed the cgardens/persistence_root branch from acefa4e to 42bc19f Compare August 17, 2020 19:58
@cgardens cgardens force-pushed the cgardens/persistence_root branch from 42bc19f to 268298b Compare August 17, 2020 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants