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

Provide ini options as a JS object #29

Closed
willwhite opened this issue Jan 8, 2014 · 6 comments
Closed

Provide ini options as a JS object #29

willwhite opened this issue Jan 8, 2014 · 6 comments

Comments

@willwhite
Copy link
Contributor

We could get a slightly simpler configuration if we were able to pass a hash into the Options constructor in addition to an ini file path.

new osrm.Options({
    threads: 8,
    hsgrData: 'path/to/data'
    ...
}, true);
@jfirebaugh
Copy link
Member

See also #20.

@springmeyer
Copy link

👍 This was not originally possible, but should be now based on refactoring in osrm core. I've not had a chance yet to dive into #20, so anyone feel free to take it.

@springmeyer
Copy link

@DennisOSRM - can you explain the basics of how to use GenerateServerProgramOptions if an ini file is not passed in? Do we populate argv with each file rather than the ini itself: https://github.com/DennisOSRM/node-osrm/blob/4e3224cfa8c3f89082130899ebde5160fc64d164/src/options.hpp#L83. Also, why pull program_options.hpp into node-osrm vs keeping it in OSRM core? Is it because you imagine the logic will diverge (since the command line tools will continue to support .ini)?

@DennisOSRM
Copy link
Contributor

Excellent question @springmeyer. The program portions header should become unnecessary. It is now included as a work around. I imagine that we use/support the shared memory mechanism only with the node bindings and thus the data files are managed with osrm-datastore.

@DennisOSRM
Copy link
Contributor

This issue can be closed once we do #35

@jfirebaugh
Copy link
Member

0d3679f

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

No branches or pull requests

4 participants