Im trying to recreate an exisiting api in json server to be able to use mock data locally. Now Im stuck, because I can't find a way to create deeper routes.
I need two routes:
/api/v1/definintion/:table and
/api/v1/:table/list
My routes.json:
{
"/api/v1/*": "/$1",
"/:table/list": "/:table",
" /definition/:table": "/:table/definition"
}
I'm using javascript for this. How can I define the /:table/definition route inside my index.js?
And how can I define diffrent outputs for the :table param?
An example call could be /api/v1/definintion/employees.