An open API service indexing awesome lists of open source software.

https://github.com/ff6347/echo-server


https://github.com/ff6347/echo-server

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Echo Server

Simple js script that creates a server that listens on port 8000 and echoes back the message it receives.

## Setup

```bash
npm ci
node index.js
```

## Usage

```bash
# POST
curl -X POST -H 'Content-Type: application/json' -d '["Hello World"]' 'http://localhost:8000'
# or on an different route
curl -X POST -H 'Content-Type: application/json' -d '["Hello World"]' 'http://localhost:8000/foo/bah'
# GET
curl 'http://localhost:8000/foo/bah'
```