Routes with Default

const api = new Api(stack, "MarukiApi", {
  routes: {
    "GET /": "functions/lambda.get_developers",
    "GET /developer/{id}/entries": "functions/lambda.get_developer_entries",
    "$default": "functions/lambda.no_route_found"
  }
}
D
Image of Dylan Lacey
Dylan Lacey
@dylanlacey
powered byLogosnappify