1.1.8 • Published 3 years ago

mock-ui v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

MIT License

Size

Size

Size

Size

Size

MOCK SERVER

Easily mock server responses for apps with an easy to use GUI on your local device.

Whats New?

Please update to new the newest version to have a better experience.

  • Data Persistence.
  • Better Error Handling.

Upcoming features

  • Support for more HTTP verbs.
  • Switch between profiles from UI.
  • Inline JSON Editor.
  • Integration with your Projects.
  • VSCODE extension.
  • GRAPHQL support
  • More flexibility.

Features

  • Interactive UI
  • Working API in 3 clicks
  • Runs Locally
  • Data Persistence
  • Cross platform

Installation

Install mock-ui with npm

  npm install -g mock-ui
  mock-ui

API Reference

For now all requests are post

Get all users

  POST http://localhost:8008/routes

Add user

  POST http://localhost:8008/user/add

Get routes for a user

  POST http://localhost:8008/api/:user-id
ParameterTypeDescription
user-idstringRequired. id of your user

Add a route

  POST http://localhost:8008/routes/add
{
	"id": "1Qupx5C5BU",
	"route": "users",
	"response": {
		"name": "John Doe",
		"age": 20
	}
}
ParameterTypeDescription
idstringRequired. id of your user
routestringRequired. name of route
responsestringRequired. JSON that will be returned as response

Query a route

  POST http://localhost:8008/:user-id/:route
ParameterTypeDescription
idstringRequired. id of your user
routestringRequired. name of route

Update the response of a route

  PATCH http://localhost:8008/routes/update
{
	"id": "1Qupx5C5BU",
	"route": "users",
	"response": {
		"name": "Jane Doe",
    "email": "jane@email.com",
		"age": 25
	}
}
ParameterTypeDescription
idstringRequired. id of your user
routestringRequired. name of route
responsestringRequired. JSON that will be returned as response

Delete a route

  DELETE http://localhost:8008/routes/del
{
	"id": "yWqkIj5riP",
	"route": "users"
}
ParameterTypeDescription
idstringRequired. id of your user
routestringRequired. name of route

Clone

Clone the project

  git clone https://github.com/elliot40404/mock-server.git mock-ui

Go to the project directory

  cd mock-ui

Install dependencies

  npm install

Start the server

  npm run start

Create a link to run globally

    npm link

Contributing

Contributions are always welcome!

Tech Stack

Client: VUE3

Server: Node, Express

Checkout https://chaos-8ef21.web.app/ for an web editor

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago