This Issue 21 needs to register an endpoint pattern for /line which handles the GET method
Required URL parameters : /line and /line/{id}
Changes Introduced:
1.Added a new module line.mjs to handle the /line endpoint with the specified requirements.
2.Modified app.mjs to include the new lineRouter for handling /line requests.
3.Updated existing code for better error handling and asynchronous behavior in the line-related functionality.
Testing
Reviewer Steps experience that impact of your changes as part of this software repository:
1.Navigate to the Tpen services folder.
2.npm install (For installing the dependencies )
3..npm start (Running the application)
4.Terminal Response : Listening on 3001
I have updated the code with the requested comments and added the end to end functionality,exists and functionality unit test cases and everything gets passed.
This Issue 21 needs to register an endpoint pattern for /line which handles the GET method Required URL parameters : /line and /line/{id}
Changes Introduced:
1.Added a new module line.mjs to handle the /line endpoint with the specified requirements. 2.Modified app.mjs to include the new lineRouter for handling /line requests. 3.Updated existing code for better error handling and asynchronous behavior in the line-related functionality. Testing
Reviewer Steps experience that impact of your changes as part of this software repository:
1.Navigate to the Tpen services folder. 2.npm install (For installing the dependencies ) 3..npm start (Running the application) 4.Terminal Response : Listening on 3001
Testing(Browser/Postman):
1.URL test : GET : http://localhost:3001/line/123 2.Test without the id : GET : http://localhost:3001/line/ 3.Test with id as not number : GET: http://localhost:3001/page/apple 4.Test with not valid id number : GET : http://localhost:3001/page/329