/simpleserver

simple http server

Primary LanguageGoMIT LicenseMIT

simpleserver

simple http server

Task

You should create your mongoDB service in the localhost, fulfill user story below and demo it.

User story

As a client, it is able to get last 10 entities from API /test/all

Acceptance Criteria

  • Test code: test these scenario
    • There are no items in the test collection
    • There are more than 10 items in the test collection
    • There are less than 10 items in the test collection
  • Use query parameter like this /test/all?last=10
  • Error handle: API should response error with match status code, the error response format is:
    {
      "err":"reason"
    }
  • Push your changes to a new branch with name Date_Fullname, for example 20210130_Alan_Hsu once you finished.