Skip to content
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

Prototype HTTP API #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Prototype HTTP API #1

wants to merge 7 commits into from

Conversation

potomak
Copy link
Member

@potomak potomak commented Oct 22, 2017

The issuehunter HTTP API will complement the dapp. A PostgreSQL backend will keep indexes on campaigns.

TODO

  • Handle PostgreSQL connections
  • Route requests
  • GET / - returns a static HTML page
  • GET /campaigns - returns a list of campaigns
  • GET /campaigns/:id - returns a campaign
  • Create a campaign model
  • Create a campaign JSON representation
  • Create an index by last modification date on campaigns

The server listens on port 3000 for TCP connections and serves:

* `GET /` - returns a static `index.html` asset
* `GET /stylesheets/*` - returns static assets found in the
  `static/stylesheets` directory
* `GET /hello` - an example handler function that returns a string

Resources:

* https://codegangsta.gitbooks.io/building-web-apps-with-go/content/testing/unit_testing/index.html
* https://codegangsta.gitbooks.io/building-web-apps-with-go/content/testing/end_to_end/index.html
* https://codegangsta.gitbooks.io/building-web-apps-with-go/content/url_routing/index.html
* https://github.com/julienschmidt/httprouter
* https://golang.org/pkg/net/http/httptest/
@potomak potomak requested a review from bugant October 22, 2017 13:59
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.

1 participant