Frequently Asked Questions (FAQ)
What is mockforme?
mockforme works seamlessly with all major frontend frameworks like React, Angular, Vue, or even vanilla JavaScript. The integration is quick and easy.
How do I get my Access Token?
To generate an Access Token, sign up at dashboard.mockforme.com. You can also access the token page directly here.
The token is valid for 30 days, after which you’ll need to generate a new one.
Does mockforme work with React, Vue, Angular, or other popular frontend frameworks?
Yes! mockforme is framework-agnostic and can be used with any frontend stack. You can check examples here.
Is it safe to use in production?
No. mockforme is designed for development and testing environments only. It is recommended to use it like:
import { mockforme } from 'mockforme';
const isDev = process.env.isDev;
/**
* Wrap initialisation under condition.
*/
if (isDev) {
const TOKEN = 'ACCESS_TOKEN';
mockforme(TOKEN).run();
}
Does mockforme retain revisions of mock data?
No. It does not retain any revisions of the documents. Once a document is deleted, it is permanently removed.
We strongly recommend not using any production data for mocks.
Http Error codes?
- 410 Token expired
The MockForMe token remains valid for 30 days. Once it expires, any request will return an HTTP
410status code along with the following error object:
{
"status": 0,
"message": "Authentication token expired",
"result": null,
"errorCode": 0
}
- 422 Invalid access token
If an invalid access token is provided during mockforme initialization, you'll receive the following error object:
{
"status": 0,
"message": "Not adequate permission to access/update resource",
"result": null,
"errorCode": 0
}