Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lore/faux-server
https://github.com/lore/faux-server
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/lore/faux-server
- Owner: lore
- License: mit
- Created: 2016-01-27T03:45:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-04T05:34:20.000Z (almost 9 years ago)
- Last Synced: 2024-05-16T23:53:11.959Z (7 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Faux-Server
===Intercept requests to RESTful endpoints and replace them with requests against the client store.
##Usage
===Require and load the faux server. Once loaded all http(s) requests will be faked out.
```
var fauxServer = require('faux-server');
fauxServer();
```Options:
---
```
debug: whether or not to log requests to your console. defaults to true.
``````
delay: delay (in ms) between receiving the request and responding. Use to fake out network latency.
```options usage:
---
```
var fauxServer = require('faux-server');
fauxServer({ debug: false, delay: 100 });
```## Disabling faux-server:
---```
var fauxServer = require('faux-server');
var server = fauxServer();
server.restore();
```