add gin router & health check endpoint

Review Request #2118 — Created Dec. 11, 2022 and submitted

Information

hg.sr.ht/~grim/cerestial
default

Reviewers

Add gin router & health check endpoint

Adds the gin router and a health check endpoint at GET /health.

You can verify it still works by making a request to http://localhost:3000/api/v1/moon and you should see data that looks like this:

{
  "moon": {
    "age": 17.55,
    "distance_km": 405440.6286692368,
    "illumination": 91.495,
    "phase": "Waning Gibbous",
    "zodiac": {
      "sidereal": "gemini",
      "tropical": "cancer"
    }
  }
}
Summary ID
add gin router & health check endpoint
276d77c31f0030ea34be9229822b409f84979f17
grim
  1. Ship It!
  2. Great work, some minor nits but I'll take care of them! Thank you so much for your hard work!!

  3. api/api.go (Diff revision 1)
     
     

    again, separate pkg imports and 3rd party imports with a new line

  4. main.go (Diff revision 1)
     
     

    Typically we separate out our imports from 3rd party ones with a blank line.

  5. 
      
grim
Review request changed

Status: Closed (submitted)

Loading...