Example 6446

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "POST"
path: "/users/:id"
handler: "createOrders"
auth: false
}

{
method: "POST"
path: "/posts"
handler: "getProducts"
auth: false
}

{
method: "GET"
path: "/orders/:id"
handler: "listPosts"
auth: true
}

{
method: "PUT"
path: "/posts"
handler: "createOrders"
auth: true
}
]
}

See also