0.2.3 • Published 10 years ago

restmock v0.2.3

Weekly downloads
48
License
-
Repository
github
Last release
10 years ago

restmock

Mock REST response on Server or Browser.

Server Mock

It can create a quick REST server by specifying routes in a json configuration file, additionally supporting static path.

restmock configure file : default mock.json

Browser Mock

It replaces window.XMLHttpRequest, and load mock.json in target project as configuration.

  • only support browserify bundling
  • steps
    • $ npm install restmock
    • write mock.json in root of target project
    • add require('restmock') to project main file
    • you have to remove require('restmock') in production environment.

Configuration

It supports all express method, with more specifically following route type

  • get
  • post
  • patch
  • put
  • delete
  • static : create a static folder with response as target folder

Example

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago