mockman-js
v1.1.5
Published
<p align="center"> <a href="https://github.com/neogcamp/mockman" rel="noopener" target="_blank"><img src="https://github.com/neogcamp/mockman/blob/main/src/assets/Mockman.png" width="120" height="120" align="center"/></a>
Downloads
2,054
Maintainers
Readme
🤔 About
🚀 MockmanJS gives plug and play React Component to test your fake mock-backend APIs.
⚡ Mocking Libraries such as MirageJS, JSON-Server etc. provide fake RESTful APIs. But sadly, you cannot test them without actually using them in your project.
🌌 Mockman is POSTMAN; but for Mock APIs.
🤩 Import Mockman in your project and get started!
You build Mock APIs, Mockman will handle the REST!
⬇ Installation
Install Mockman by running:
npm i mockman-js
yarn add mockman-js
🛠️ Usage
Import the component in your App
/*
we encourage to have a dedicated route called `/mock-api` on your frontend app where you can import Mockman and test them
*/
import React from "react";
import Mockman from "mockman-js";
function MockAPI() {
return (
<div className="MockAPI">
<Mockman />
</div>
);
}
export default MockAPI;
Import Styles
In your index.html
, add the following:
<link
rel="stylesheet"
href="https://unpkg.com/mockman-js@latest/dist/style.css"
/>
You can always override the default styles by defining your custom css.
Color Scheme
Mockman currently supports colorScheme
prop to define color scheme to Mockman component.
The colorScheme
prop currently accepts two values - "standard" (default) and "dark".
<Mockman colorScheme="dark" />
💖 We love Contributions
mockBEE is truly Open Source. Any sort of contribution to this project are highly appreciated. Create a branch, add commits, and open a pull request.
Please read
CONTRIBUTING
for details on ourCODE OF CONDUCT
, and the process for submitting pull requests to mockBEE.
🛡️ License
This project is licensed under the MIT License - see the LICENSE
file for details.