# echo-server

> An HTTP server which responds with the request in JSON

Latest version **0.4.0** (published 2014-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install echo-server
pnpm add echo-server
yarn add echo-server
bun add echo-server
```

Provides the command `echo-server`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2014-09-19 |
| First published | 2013-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Jaime Pillora |
| Maintainers | jpillora |

## Links

- npm: https://www.npmjs.com/package/echo-server
- Repository: https://jpillora@github.com/jpillora/node-echo-server
- Homepage: https://github.com/jpillora/node-echo-server
- Issues: https://github.com/jpillora/node-echo-server/issues
- npm.io page: https://npm.io/package/echo-server

## Dependencies (1)

- [mongoose](https://npm.io/package/mongoose.md) ^3.8.16

## Recent versions

- 0.4.0 (latest) — 2014-09-19
- 0.2.0 — 2014-08-06
- 0.1.5 — 2013-10-04
- 0.1.4 — 2013-09-15
- 0.1.3 — 2013-09-15
- 0.1.2 — 2013-09-15
- 0.1.1 — 2013-09-15
- 0.1.0 — 2013-09-15

## README

# <name>node-echo-server</end>

## Summary

<description>An HTTP which responds with the request in JSON</end>

## Private Usage

```
npm install -g echo-server
```

## Public Usage

* Git clone
* Add heroku remote
* Push

Currently running at http://echo.jpillora.com

## Example

Start server
```
$ echo-server 5000
listening on 5000...
```

Make your requests
```
$ curl http://localhost:5000/foo/bar
{
  "ip": "127.0.0.1",
  "method": "GET",
  "url": "/foo/bar",
  "body": "",
  "headers": {
    "user-agent": "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8x zlib/1.2.5",
    "host": "localhost:5000",
    "accept": "*/*"
  },
  "meta": {
    "total": 1,
    "live": 1
  }
}
```

## Simulate delays

Include `/delay/<time in ms>` in the url

## Simulate non-200 status codes

Include `/status/<status code>` in the url

## Meta data

`total` number of requests sent to the server

`live` number of requests currently open on the server

# Stores metrics in MongoDB

Just set your `MONGOLAB_URI` env var and it will start storing `echo` documents

<license()>
#### MIT License

Copyright &copy; 2013 Jaime Pillora &lt;dev@jpillora.com&gt;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</end>

---
_Source: https://npm.io/package/echo-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
