eigengo/lift

MicroserviceApp does not register the API path.

Closed this issue · 2 comments

Hi congrats for the awesome project, that I saw presented at scala exchange.

In the MicroserviceApp the pattern used to register:

ClusterInventory(system).set("api", s"http://$hostname:$port?version=${microserviceProps.version}&side=${microserviceProps.cqrs.mkString(",")}")

Is not the same as the one used in the AdapteesActor to parse the address:

val Address = "http://(.*):(\\d+)(.*)\\?version=(.*)&side=(.*)".r

So when the AdapteesActor try to match the URL it is failing. The problem is that the RestApi in BootedNode is defined as function from ExectionContext to Route, it should expose some information regarding the path.

Probably it makes sense to have the path, version and side as part of the RestApi type instead of MicroserviceProps.

What do you think about it?

P.S. I saw the Reference type in Adaptees that is not used, was it intended to be used to define the path?

That's right—though we're dropping the adapter layer in our infrastructure. @anirvanc and his lot will be open-sourcing our container-based infrastructure code (servers on AWS; CI & CD including the iOS codebase) this week.

Oh I see, looking forward for that then, thanks