Catalog npm
PACKAGE EXPLORERView in registry

360-mock-server

npm

🚀 Zero-config dynamic mock REST API server with Faker.js auto-generation for frontend developers

apiauto-generatebackendcruddevelopmentfakefakerfrontendjsonmockrestservertesting
Versions collected13
Direct dependencies4From release 1.2.8
Last observed20 Oct, 19:26 UTC

README

Current package documentation

🚀 360 Mock Server

360 Mock Server is a zero-config mock REST API for frontend developers. Create, update, delete, paginate, and auto-generate fake data without building a backend.

Perfect for React / React Native / Redux / demos / testing.

✨ Features

  • Zero configuration
  • Works with any REST endpoint
  • Full CRUD (GET, POST, PUT, PATCH, DELETE)
  • Fake data generation (Faker.js)
  • Pagination & Sorting
  • Full-text Search (?q=)
  • Response Delay Simulation
  • Error Rate Simulation
  • Static File Serving (public/ folder)
  • Persistent JSON storage
  • Interactive CLI + REST API
  • CORS enabled

📦 Installation

npm install -g 360-mock-server
# or
npx 360-mock-server

⚡ Start Server

npx 360-mock-server

Server runs at:

http://localhost:5050

🧠 Manual + Faker + Pagination (All-in-One)

▶️ Manual CRUD (Normal API)

POST /users
{ "name": "Ali", "email": "ali@test.com" }

GET /users
GET /users/123

PATCH /users/123
{ "email": "new@test.com" }

DELETE /users/123

🎲 Faker.js – Auto Generate Fake Data

Just send fields array:

POST /users
{
  "fields": ["name", "email", "avatar", "phone"],
  "count": 10
}

Works for any resource:

POST /products
{
  "fields": ["productName", "price", "category"],
  "count": 20
}

Get all supported faker fields:

GET /faker/fields

📄 Pagination (Built-in)

GET /users?_page=1&_limit=5

Response:

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 5,
    "totalItems": 20,
    "totalPages": 4,
    "hasNextPage": true,
    "hasPrevPage": false
  }
}
  • Pagination works on any resource
  • If _limit is missing → returns full array

Search across all fields in a resource:

GET /users?q=search_term

⏳ Delay & Error Simulation

Simulate slow networks or server failures:

# Global delay for all requests
GET /users?_delay=1000

# Global settings via CLI (see Options)

💻 Frontend Usage

Fetch

fetch('http://localhost:5050/users')
  .then(res => res.json())
  .then(console.log);

Axios

axios.get('http://localhost:5050/users', {
  params: { _page: 1, _limit: 10 }
});

🖥 Interactive CLI

After starting server:

360-mock> POST /users {"name":"Ali"}
360-mock> GET /users
360-mock> DELETE /users/123

Commands:

  • list – list resources
  • clear – clear terminal
  • exit – quit

⚙️ Options

npx 360-mock-server --port 4000
npx 360-mock-server --file db.json
npx 360-mock-server --delay 1000        # Add 1s delay to all responses
npx 360-mock-server --error-rate 10     # 10% chance of 500 Error

📂 Static Files

If a public folder exists in your project directory, files inside will be served automatically at the root.

💾 Storage

Data is stored locally in:

mock-data.json

🪪 License

MIT © zahidrahimoon

Built with ❤️ for developers

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 13

Collected releases
VersionPublishedDirect dependenciesOpen version
1.2.8Registry latest27 Feb 20264
1.2.727 Feb 20264
1.2.628 Jan 20264
1.2.528 Jan 20264
1.2.426 Jan 20264
1.2.325 Jan 20264
1.2.225 Jan 20264
1.2.124 Jan 20264
1.2.024 Jan 20264
1.1.124 Jan 20263
1.1.024 Jan 20263
1.0.124 Jan 20263
1.0.024 Jan 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

ACCESSIBLE
zahidrahimoon/mock-server

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
master
Last push
27 Feb 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots21 Oct 2026
10.50
2026-10-21: 0 · observed 2026-10-21T09:01:51.2608322Z
21 Oct21 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2102026-10-21T09:01:51.2608322Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:fafc8100581870b7994135712809be8eb48f7b96629f5585efd604fe7c35c62f