Catalog npm
Back to packageRELEASE DETAILS

1.2.1

npm

360-mock-server

๐Ÿš€ Zero-config dynamic mock REST API server with Faker.js auto-generation for frontend developers

apiauto-generatebackendcruddevelopmentfakefakerfrontendjsonmockrestservertesting
Published24 Jan 2026
Direct dependencies4
Transitive dependenciesNot calculated

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.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
cors
Environment
{
  "local_name": "cors",
  "alias": false,
  "peer_metadata": null
}
^2.8.5runtime
express
Environment
{
  "local_name": "express",
  "alias": false,
  "peer_metadata": null
}
^4.18.2runtime
commander
Environment
{
  "local_name": "commander",
  "alias": false,
  "peer_metadata": null
}
^11.1.0runtime
@faker-js/faker
Environment
{
  "local_name": "@faker-js/faker",
  "alias": false,
  "peer_metadata": null
}
^10.2.0runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "fab311cf424cca89a5019b299351d01741f4b4bb",
  "tarball": "https://registry.npmjs.org/360-mock-server/-/360-mock-server-1.2.1.tgz",
  "fileCount": 5,
  "integrity": "sha512-WNJNe5krQ8/dGxlpOSsgPxEzTGoHVQuY53GCFi9fWE9oW7f579qytGUlAiV5W/FgitRL6Vz1JKYJjK41hdQSJA==",
  "signatures": [
    {
      "sig": "MEQCIAcDFU/mkuflaZfBSSufa9qjUexEttF1D2ij5Blzr5KQAiBAL+o0seOK6r6zSmCwjI+8dMhtgO9mqn6B/EEcJPN/3Q==",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 29444
}

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_version:eecd4cda6d9c3bfbf0543df0945e447202a6b6922e88587d08f33bd0d2f553eb

Other collected versions

1.2.827 Feb1.2.727 Feb1.2.628 Jan1.2.528 Jan1.2.426 Jan1.2.325 JanView all collected versions โ†’