Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prahladyeri/http-live-simulator
A simple HTTP Server that serves with random delay for live simulation
https://github.com/prahladyeri/http-live-simulator
http-server javascript
Last synced: about 2 months ago
JSON representation
A simple HTTP Server that serves with random delay for live simulation
- Host: GitHub
- URL: https://github.com/prahladyeri/http-live-simulator
- Owner: prahladyeri
- License: mit
- Created: 2018-07-02T14:17:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T02:27:31.000Z (almost 4 years ago)
- Last Synced: 2024-07-07T15:45:39.756Z (2 months ago)
- Topics: http-server, javascript
- Language: JavaScript
- Homepage: https://github.com/prahladyeri/http-live-simulator
- Size: 10.7 KB
- Stars: 58
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Live Simulator
`http-live-simulator` is a simple http file server for local development written in Node.JS. It is similar, for instance, to python's `http.server` module or node's `http-server`, but with one major difference: It adds a random time delay of 200-500 milliseconds before serving each request in order to simulate a live hosted environment where such delays are a common occurrence.
## Installation:
`npm install -g http-live-simulator`
## Usage:
```
$ http-live
Serving Directory: /your/current/path
Port 8080
Delay: 200-500ms
```You can change the behaviour of http live server with following optional arguments:
```
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-p PORT, --port PORT Port number for running the server
-m MIN_DELAY, --min-delay MIN_DELAY
Minimum delay in milliseconds
-x MAX_DELAY, --max-delay MAX_DELAY
Maximum delay in milliseconds
```## Uninstallation:
`npm uninstall -g http-live-simulator`