Example 5455

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "PUT"
path: "/posts/:id"
handler: "updateOrders"
auth: false
}

{
method: "GET"
path: "/comments"
handler: "deleteProducts"
auth: true
}

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

{
method: "POST"
path: "/products/:id"
handler: "updatePosts"
auth: false
}

{
method: "GET"
path: "/posts"
handler: "listOrders"
auth: false
}
]
}

See also