DJDNS / go-deje

Golang library for DEJE Next, a protocol/technology for decentralized document hosting and concurrent editing.
GNU Lesser General Public License v2.1
8 stars 0 forks source link

Router should host files based on $GOPATH, not binary location #44

Closed MaddieM4 closed 10 years ago

MaddieM4 commented 10 years ago

Something that was unearthed during the last demo, was that you cannot go install github.com/DJDNS/go-deje/demo/router and then just run the in-PATH router, if you want the HTTP server to work. Currently, the router expects its hosted files to be in a specific location relative to the location of the binary, and the location that go installs to does not have the files at $binary_dir/../browser.

We need to take a different approach. Assume that $GOPATH/src/github.com/DJDNS/go-deje is populated, and use that as our starting point for finding the dir we want to host. This should be reliable whenever the go environment has been configured properly.