It should be possible to pass the server constructor a list of API routes. These routes could be handled directly without invoking a HTTP request.
We need a modified Axios adapter that checks for model/collection url's hostname (127.0.0.1 & localhost allowed) and checks if the API route exists in server's API routes list.
The actual route handler needs to be called with Express' request & response objects, so it can be also used as a regular API route over HTTP. We need to check how Express initializes these objects internally to be able to set the needed data for non-HTTP requests.
It should be possible to pass the server constructor a list of API routes. These routes could be handled directly without invoking a HTTP request.
We need a modified Axios adapter that checks for model/collection url's hostname (127.0.0.1 & localhost allowed) and checks if the API route exists in server's API routes list.
The actual route handler needs to be called with Express' request & response objects, so it can be also used as a regular API route over HTTP. We need to check how Express initializes these objects internally to be able to set the needed data for non-HTTP requests.