Let's say we have an Angular web app that lists patients, the route would be something like http://localhost:4200/patients.
Is there a way to deliver the same content (from the exact same data source) in JSON format (application/json) by calling http://localhost:4200/server/api/patients, for example?
In other words, I'd like to build a REST API endpoint with Angular.
EDIT: My goal is to provide a means for external systems to access real data in production environments.