项目作者: WowMuchName

项目描述 :
Echo-Server supporting both http and websockets
高级语言: TypeScript
项目地址: git://github.com/WowMuchName/multiecho.git
创建时间: 2019-06-24T15:59:48Z
项目社区:https://github.com/WowMuchName/multiecho

开源协议:MIT License

下载


multiecho

Echo-Server supporting both http and websockets. It listens for connections on a specified port.
HTTP- and WS-Echo are handled on the same route.

When a HTTP-Request is made, the server responds with a json response that echoes headers,
method, url and other parameters used in the request back to the sender.

When a websocket session is established, the server echoes back each send packet.

Installation

Via Docker

  1. docker run -d -p 3000:3000 wowmuchname/multiecho

Via NPM

  1. npm i -g multiecho
  2. multiecho

Port-Configuration

The listener port is determined as follows

  1. If a commandline argument is passed, it is used as port
  2. If the environment-variable ECHOPORT is set, it is used as port
  3. Port 3000 is used

Custom port with Docker

  1. docker run -d -p MYPORT:3000 wowmuchname/multiecho

Custom port with npm

  1. multiecho MYPORT