json-server
                                
                                 json-server copied to clipboard
                                
                                    json-server copied to clipboard
                            
                            
                            
                        Custom routes.json not working with :parameters
I tried to reproduce the following locally: https://github.com/typicode/json-server/issues/167
I copied the route to my routes.json:
"/Data/Items/:itemId/Document/:id.json": "/Document/:id"
I then added Document to my db.js file in my js function that returns JSON.
"document": [
    {
      "id": 346,
      "itemId": 42,
      "foo": "bar",
      "body": "some data"
    }
  ]
Navigating to the /document route works, the rewritten route does not.
This is the route I tried to hit: /Data/Items/3/Document/2.json