simple-json-replay-server
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -0,0 +0,0 @@ { |
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
} |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
{ | ||
"name": "simple-json-replay-server", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "A simple json replay server which can be used for standalone frontend web application (angular especially) when development. Simply put the url & parameters & response json data, then hit the url in browser or from your web application, whenever it matches the url and parameters, it will return the best match json data.", | ||
@@ -13,2 +13,10 @@ "main": "main.js", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/realdah/simple-json-replay-server" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/realdah/simple-json-replay-server/issues" | ||
}, | ||
"homepage": "https://github.com/realdah/simple-json-replay-server", | ||
"keywords": [ | ||
@@ -15,0 +23,0 @@ "angular", |
@@ -8,6 +8,6 @@ # Simple JSON Replay Server ❤️ [![Build Status](https://travis-ci.org/realdah/simple-json-replay-server.svg?branch=master)](https://travis-ci.org/realdah/simple-json-replay-server) [![npm version](https://badge.fury.io/js/simple-json-replay-server.svg)](https://badge.fury.io/js/simple-json-replay-server) [![Node version](https://img.shields.io/node/v/simple-json-replay-server.svg?style=flat)](http://nodejs.org/download/) | ||
You probably will be disappointed, because not all but at least majority of them are fancy shinning restful style severs which either return dynamic json in memory or manipulate some text based db files. And obviously, they will all require you to send standard restful style requests and then response with some dynamic results which you might have to think hard to set it up. | ||
You probably will be disappointed, because not all but at least majority of them are fancy shinning restful style severs which either returning dynamic json in memory or manipulate some text based db files. And obviously, they will all require you to send standard restful style requests and then response with some dynamic results which you might have to think hard to set it up. | ||
Isn't it overkill? if we just need a mock server for development and unit testing. | ||
Or, if you have legacy backend API design, which are not strictly following restful specifications. | ||
Or, if you have legacy backend API design, which are not strictly following restful URL patterns. | ||
@@ -22,2 +22,6 @@ ## Simple Features | ||
* **Simple but still Powerful**, You can configure different rules to simulating different responses to cover different scenarios for the same service call, such as paginiation, error, failure etc. | ||
## Sampe Use Cases | ||
https://github.com/realdah/simple-json-replay-server/wiki/Some-use-case-scenarios-for-demonstrating-how-to-use-this-tool | ||
@@ -49,10 +53,11 @@ ## Node Dependency | ||
Once start replay server, you can hit <http://localhost:8008/test> to see the result. | ||
Once start replay server, you can hit <http://localhost:8008/test?param1=value1%20to%20be%20matched¶m2=value2%20to%20be%20matched> to see the result. | ||
> Please note: you are able to config a different port number if it conflicts. | ||
Example: | ||
``` | ||
example.json | ||
``` | ||
{ | ||
@@ -117,3 +122,3 @@ "request" : { | ||
method | http methods | Yes | Default as **get** | ||
query | key value pairs | Yes | Default as **undefined**. You can think about this is a filtering logic. As long as you defined a key-value, it will only allow request which contains this query parameter and same value to pass through. | ||
query | key value pairs | Yes | Default as **undefined** (no filtering). You can think about this is a filtering logic. As long as you defined one or more key-value pairs, it will only return results which exactly matching these query parameters to pass through. If multiple results all matching, it will choose the first one. | ||
body | a json map | Yes | Default as **undefined**. you can have partial values in multiple layers, it will only try to match partial branch of the value till the end. So far, only support **json body** (application/json) & **form-urlencoded** (application/x-www-form-urlencoded) when **post**. | ||
@@ -253,2 +258,2 @@ headers | key value pairs | Yes | default as undefined. Similiar to **query**, if you add any thing in here, it will filter out the data with headers having specific value. | ||
0.0.11 | support filtering by **headers** value. | ||
0.0.12 | support new response type as **html** | ||
0.0.12 | support new response type as **html** |
@@ -0,0 +0,0 @@ var express = require('express'); |
@@ -0,0 +0,0 @@ var _ = require('underscore'); |
@@ -0,0 +0,0 @@ var glob = require("glob"); //load many files and filtering with some rules at one shot |
@@ -0,0 +0,0 @@ var _ = require('underscore'); |
@@ -0,0 +0,0 @@ var chokidar = require('chokidar'); |
@@ -0,0 +0,0 @@ var assert = require('assert'); |
@@ -0,0 +0,0 @@ var assert = require('assert'); |
@@ -0,0 +0,0 @@ var assert = require('assert'); |
@@ -0,0 +0,0 @@ var assert = require('assert'); |
@@ -0,0 +0,0 @@ var assert = require('assert'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
1
255
1
42720