Covalent Quickstart includes the ultimate prototyping tool, a localhost Mock API!
With the mock API server, you can develop against realistic API service endpoints, and model the mock data closely to your production data!
The mock api server is called Covalent Data and is available as an npm package .
Covalent Quickstart integrates Covalent Data in its installation, so no additional steps are required to use it. In the covalent quickstart directory, simply run:
You should see the server running starting with:
The server is running as a background process so it's still possible to use the terminal for other commands. To stop covalent data, type:
You can easily modify or create new schemas for mock data in the
/mock-api/schemas/
directory.
For example to modify the mock users , edit
mock-api/schemas/users.yaml
Dynamic data is wrapped in _underscores_ that match up to text files in
/mock-api/datum/
.
For example the
_firstname_
in the yaml above just looks for
/mock-api/datum/firstname.txt
, and each value is on a single line:
The Mock API Server generates real endpoints that can be consumed in Angular services.
The Covalent Data Mock API Server actually stores data in memory, so it's possible to add, update, and delete records. All changes made will be erased once Covalent Data is stopped. See the Covalent Data repo for more information.