Example 2650

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "DELETE"
path: "/orders"
handler: "updateOrders"
auth: true
}

{
method: "POST"
path: "/products/:id"
handler: "createPosts"
auth: true
}

{
method: "POST"
path: "/orders"
handler: "listUsers"
auth: true
}

{
method: "PATCH"
path: "/comments/:id"
handler: "getOrders"
auth: false
}
]
}

See also