Skip to content

Mock Api

Auron Vila edited this page May 5, 2024 · 2 revisions

Mock API Overview:

The mock API facilitates the exchange of requests with a simulated backend, allowing the application to receive predefined data in response.

authFakeApi.ts

Purpose: authFakeApi.ts serves as a simulated API specifically tailored for authentication within the application. Developers can configure its URL to mirror that of the real backend API, if available. Upon receiving a request, this fake API responds with authentication data sourced from the data/authData.ts file, effectively emulating the authentication process.

Authentication Process: In the SignIn.tsx form, users provide their credentials (username and password), which are then forwarded to the fake API for authentication. This ensures that the mock API functions seamlessly, requiring the necessary input data to operate accurately.

You can add more fake api's and start to develop your app without needing a backend application.

Clone this wiki locally