Skip to content

Latest commit

 

History

History
93 lines (52 loc) · 2.89 KB

README.md

File metadata and controls

93 lines (52 loc) · 2.89 KB


DownloadReleaseLicense: MPL 2.0DocumentationAuthorContact

A developer friendly mock server with GUI, Traffic Capturing and with many more features. This gives boost in your front-end development without any actual production server.

Run Locally

  • Download the onemock-v1.1.jar build file from the latest release, click here to download.

Start the Server

java -jar onemock-v1.1.jar

Default port is 8080

Start the Server with custom port

java -jar -Dserver.port=9001 onemock-v1.1.jar

Features

  • Create mocks with more than one responses from a single endpoint.
  • Traffic can be captured from your application for a better analysis.
  • User friendly GUI to configure everything without a single line of code.
  • SQLiteDB and Java allows the mocks and capture history portable across the machines.

Requirements

To run the server, you will need to install the following in your machine.

Java

Usage

Access the dashboard at http://localhost:8080/home from any browser.

To use the mock server in any front-end code put the base url as http://localhost:8080/onemock and append the rest of the path to this.

For Example

const base_url = "http://localhost:8080/onemock";

let fetchRes = fetch(base_url + "/todos/1");

fetchRes
    .then((res) => res.json())
    .then((data) => {
        console.log(data);
    });

Known Issues

  • At present only supported formats for request body are plain/text application/json application/xml

Tech Stack

Dashboard:   React, TailwindCSS

Server:        Spring Boot, SQLite DB

Documentation

Documentation

License

MPL-2.0 license

Authors

Har-SHAW

Feedback

If you have any feedback, please reach out to me at harshavardhan.gadireddy@gmail.com