Mayur Saner
Mayur Saner

Reputation: 462

Creating API gateway using loopback4

How can I call my loopback4 api from another LB4 application?

Let me explain more,

I have created one lb4 application as microservice. I want to create gateway & want to call this lb4 microservice in lb4 gateway application . So for this, I have given target URL. As my microservice application runs on 3000 port & my gateway application runs on 8000 port.

Now I want to access all 3000 api endpoints with 8000 port that is by using gateway application. I have referred this for gateway creation https://loopback.io/doc/en/lb4/Integrating-with-api-connect.html. But it's not working.

Then, i tried to call rest api using openapi specification. I have followed Loopback4 - Call REST API with OpenAPI definition this link. All the endpoints are created in explorer but I am getting error as 'Not Implemented' after clicking on any api for getting response.

I hope I will get the solution here from experts!

Upvotes: 0

Views: 448

Answers (1)

Amit
Amit

Reputation: 703

Not sure how you are creating your gateway but does your gateway support patterns for example routes through Zuul can be configured with path: /myusers/myservice/** that means path starting with myusers/myservice and any path after this will be configured to routed to a service.Take a look at the following page for an example :-

https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul.html

Upvotes: 0

Related Questions