This library lets you mock data and create fake API under HTTP Interceptor inside Angular apps. Mocking data functionality let's you generate any type of data based on schematic. Writing schematics is super easy when you have interfaces - your IDE will give you hints what should be inside specific fields! Mocked data can be automatically stored in the LocalStorage. In addition, you can mock whole REST API! This library gives you complete set to create API mocks: angular interceptor, router, controllers, endpoint decorators, guard decorators, pipes and param decorators - lots of things that can be found in NestJS. What's difference between this library and others? You can mock data and API at the same time just by using @UsingSchema on the Controller which lets you create RESTfull Controllers. Also, you can create real data services that call this mocked api endpoints and then just delete interceptor to use your real API!
This library is made for:
- small demo apps that don't require back-end yet
- recruitment tasks / homework
- portfolio apps
Don't use it for production apps - it's just mocking library, not fully functional back-end server. But, you can easily move this code to the NestJS!
This project was generated using Angular CLI version 21.2.0.
To install, run npm install ngx-api-mimic.
You don't need any extra steps after installing this library.
Just start using it!
ISC
For more details look into LICENSE file.
Api mock is inspired by beautiful back-end framework NestJS!
This library uses datasets from the following projects:
A big thank you to the maintainers for such amazing and large datasets!
