Closed ghost closed 8 years ago
Is there a good example of version 2 of the nodes.json specification?
https://github.com/ffnord/ffmap-backend/commit/abc84e9fc98e9ac437cf5e8f0e1a0656cfee442e I think the quotation marks were just wrong in the previous description so forget about them: The main difference is that 'nodes' is an array instead of an object in v2. It should be fairly easy to do that. I just don't have the required go skills :(
Please test the current implementation for a nodes.json version 2. I am currently not really sure what # copied from node's nodeinfo announcement
actually means, but my guess is that we need to use the unmodified information retrieved from announced.
How do I build updated code?
I have already built it. So I fetch and checkout on that branch. Is gb build sufficient to update the binary?
Simply execute gb build
and all changed packages will be rebuild and a new binary will be linked together from these packages.
Thanks, that should be stated like that in the readme..
The How to build
section is generally targeted at developers. For users I create executable binaries via Travis CI. I like to keep the README slim so there is a higher chance of people actually reading it. So repeating golang basics there feels for me kinda counterproductive.
Where is the v2 json served? The one in /v2/nodes.json is exactly the same for me. Compare: http://gl.wupper.ffrl.de:8080/v2/nodes.json http://gl.wupper.ffrl.de:8080/nodes.json
Sorry, my bad. Forgot to hookup the new rest endpoint to the correct rest method. This should be fixed now.
Can we serve the graph.json in the same directory? Meshviewer doesn't allow nodes and graph jsons in different directories. I did this myself to get this running: http://gl.wupper.ffrl.de/meshviewer/
Oh god, I wish we could retire meshviewer right now. Yeah, I forgot that meshviewer doesn't let you configure the exact URL of your datasources. But this implementation is currently only for testing. If i actually implemented a valid nodes.json V2 I will see that I make this nice and clean and usable.
So yes it works but is not usable right now
This implementation should be much more usable. You can now configure which nodes.json version should served, and the endpoint is just /nodes.json in either case. I guess parallel support for both versions is not necessary.
That works for me If you don't have anything else about this you can close the issue.
Thanks for testing. The changes have been merged.
Support for meshviewer dev branch
See https://github.com/ffnord/meshviewer/commit/9a0b5ac672a97e75100f0fac1af209ebef2115ad