Open maksumov opened 3 years ago
For case when url contains only service name and query params application responds with
For case when url contains only service name and query params application responds with
This is because the BFF app can't find a service matching the name products?test=test
. The name of the service to be proxied is defined by the application via a split by a character /
. You might as well expect to get a result by making a request to http://maksumov-bff-api-dev.eu-west-1.elasticbeanstalk.com/products-test=test endpoint
For case when url contains only service name and query params application responds with
This is because the BFF app can't find a service matching the name
products?test=test
. The name of the service to be proxied is defined by the application via a split by a character/
. You might as well expect to get a result by making a request to http://maksumov-bff-api-dev.eu-west-1.elasticbeanstalk.com/products-test=test endpoint
but url is valid. In my opinion result url sould be smth like https://productUrl?test=test
but url is valid. In my opinion result url sould be smth like https://productUrl?test=test
Url is not valid for BFF. If you want to call products service - you should send request to http://maksumov-bff-api-dev.eu-west-1.elasticbeanstalk.com/products/?test=test endpoint
Here is example from task description {bff-service-url}/{recipient-service-name}?var1=someValue
and it also has query parameter without any tailing slashes after service name
I changed the app and deployed a new version
Task 9 Definition
Task defined at https://github.com/rolling-scopes-school/nodejs-aws-tasks/blob/main/task9-bff/task.md
Task 9.1
How to test Task 9.1.
Clone repo & install dependencies with following commands:
After installing dependencies you should create .env file in the root folder of bff-service (see .env.sample for example of configuration or just rename this file to .env file).
And finally you need to compile TypeScript files by running
tsc
and then you can run service bynpm run start:dev
.This PR closes #12
Task 9.2
This PR closes #13
Additional Tasks
Add Cache
How to test caching
How to test caching (alternative method)
Request ${url} is handled from cache...
orRequest ${url} is handled from service request...
)This PR closes #15
NestJS implementation
Working on closing the task #16
Self-check
Main tasks score: 5/5 Additional tasks score: 1/2 Total expected score: 6/7
Data for Task Evaluation
URLs