edgi-govdata-archiving / eis-search

searchable bleve index for Environmental Impact Statements
GNU General Public License v3.0
4 stars 1 forks source link

Add build/run instructions #8

Closed titaniumbones closed 5 years ago

titaniumbones commented 5 years ago

steps to clone/build/run on localhost are probably obvious to go people but I'm having some trouble doing this is a non-go person. Would love to see the instructions in the README so illiterates like myself can try running locally & adidng e.g. extra HTML to make some things obvious to potential users/ testers.

Frijol commented 5 years ago

+1 and as an open source org we should adopt documentation practices as part of development flow! Needs to support new contributors as well as be flexible to participants who drop in/out as their availability changes

Frijol commented 5 years ago

Figured it out!

Prereq for doing anything:

  1. Install Go, and make sure your GOPATH ends up in the right PATH profile (there are a lot of tutorials around for this)

To just run locally:

  1. Install this repo's dependencies with go get github.com/edgi-govdata-archiving/eis-search, (run this from any directory)
  2. This actually builds it too, so if you just cd into $HOME/go/bin, you can run ./eis-search and it will serve up at http://localhost:8094

To clone & modify (not dependent on the "just running" instructions above):

  1. Clone this repo into your go directory ($HOME/go/src ordinarily. go get put dependencies in $HOME/go/bin for you).
  2. Build the project. From inside that cloned directory, go build. This should make a file called eis-search
  3. Run: ./eis-search. Go see it at http://localhost:8094

The main Go newbie gotcha, as far as I can tell: