Creating a backend API-the Angular way
A web application usually connects to a server and uses an HTTP backend API to perform operations on data. It fetches existing data and updates it, creates a new one, or deletes it. This sequence of actions is also known in software development as Create Read Update Delete (CRUD) operations.
There are cases, though, where we do not have access to a real backend API:
- We may work remotely, and the server is only accessible through a VPN connection in which we do not have access.
- We want to set up a quick prototype for demo purposes.
- Available HTTP endpoints are not yet ready for consumption from the backend development team. This is a common problem when working inside a large team of different types of developers.
To overcome all the previous obstacles during development, we can use a fake server such as the Angular in-memory web API. This can mimic all CRUD operations of an HTTP REST API and much more besides, such as...