Skip to content

Instantly share code, notes, and snippets.

@SeptiyanAndika
Last active September 7, 2017 16:44
Show Gist options
  • Select an option

  • Save SeptiyanAndika/c3e9c2b11550f119ebfb68be759b5878 to your computer and use it in GitHub Desktop.

Select an option

Save SeptiyanAndika/c3e9c2b11550f119ebfb68be759b5878 to your computer and use it in GitHub Desktop.
{
"endpoints": {
"forwarder": [{
"paths": "/users",
"method": "GET",
"service": "https://jsonplaceholder.typicode.com/users"
},
{
"paths": "/user/:id",
"params": "id",
"method": "GET",
"service": "https://jsonplaceholder.typicode.com/user/:id"
},
{
"paths": "/posts-and-users-all",
"method": "GET",
"services": {
"post": "https://jsonplaceholder.typicode.com/post",
"users": "https://jsonplaceholder.typicode.com/users"
}
},
{
"paths": "/users-detail/:id",
"param": "id ",
"method": "GET",
"service": "https://jsonplaceholder.typicode.com/user/:id",
"next": {
"name": "post",
"service": "https://jsonplaceholder.typicode.com/posts?userId={result.id}"
}
}
],
"custom": {
"GET /": "Index.showIndex",
"GET /me": [
"Auth.ensureAuth",
"User.getProfile"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment