Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atwayne/sneezy
Sneezy is a mock API server for testing purposes.
https://github.com/atwayne/sneezy
api-test api-testing mock mock-server
Last synced: 12 days ago
JSON representation
Sneezy is a mock API server for testing purposes.
- Host: GitHub
- URL: https://github.com/atwayne/sneezy
- Owner: atwayne
- License: mit
- Created: 2021-03-12T02:03:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T10:47:15.000Z (over 3 years ago)
- Last Synced: 2024-09-25T21:57:02.889Z (about 1 month ago)
- Topics: api-test, api-testing, mock, mock-server
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sneezy
[![sneezy-mock-api][npm-image]][npm-url][npm-url]: https://www.npmjs.com/package/sneezy-mock-api
[npm-image]: http://img.shields.io/npm/v/sneezy-mock-api.svg?style=flat-squareSneezy is a mock API server for testing purposees. Run `sneezy` and get whatever response you want.
## Install
```
npm install -g sneezy-mock-api
```## Usage
- Start the mock server on default port 9000
```
sneezy
```
- Or if the port is being used by another process, use the command below to run it on a different port```
sneezy --port 9001
```
- Ctrl + C to exit
## API- `http://localhost:9000/200`
Returns HTTP Status Code 200
- `http://localhost:9000/500`
Returns HTTP Status Code 500
- `http://localhost:9000/sneezy`
Returns HTTP 200 for most of the time. One in 10 times it returns 500
- `http://localhost:9000/echo`
Returns HTTP 200 with request headers and request body as response body
- Anything else gets an HTTP 404 response