Closed el-davo closed 7 years ago
Sorry but I'll have to close this as it is outside the limited design goals for this library.
However, here's a little know fact: the in-mem web api actually doesn't care about the first part of the URL. It only cares about the uniqueness of the resource name. So you can get away with
/microservice1/foo
/microservice2/bar
as long as the resource names are unique w/o regard to the path leading to them.
You can also override the parseUrl
and do almost any wacky thing you want. There's an example in the source code.
I've added tests in PR #130 which may be a good resource for you.
Hi, I am working in an environment where we are using multiple backend microservices, We have a gateway in front of all the microservices which maps requests to each one.
From the front-end perspective the api calls would be
/gateway/microservice1/resource /gateway/microservice2/resource
Ive been trying the following
And added apiBase as '/gateway'
However the above does not map correctly when the stubs are removed. So the above would map to
/gateway/microservice1/ /gateway/microservice2/
Is it possible with this library to nest resources into microservice?, something like
which would then map correctly to
/gateway/microservice1/resource /gateway/microservice2/resource