Example 3355

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "PATCH"
path: "/posts"
handler: "createPosts"
auth: false
}

{
method: "GET"
path: "/orders"
handler: "listProducts"
auth: false
}

{
method: "DELETE"
path: "/products/:id"
handler: "listOrders"
auth: true
}

{
method: "PATCH"
path: "/products"
handler: "deletePosts"
auth: true
}
]
}

See also