Will accept any TCP connection and echo back a HTTP response with the
entire content of the incoming TCP connection.
The server makes no attempt to understand the incoming HTTP request
hence it doesn't know when the request is completed and therefore just
terminates the TCP connection 2 seconds after the first data packet.
To setup a simple echo-server on Heroku just click this button:
Note that the Heroku routing stack will proxy the incoming request and
add custom HTTP headers.
Alternatively, to start it locally just run (only supported on newer
versions of npm):
Or if you whish to install the module globally:
npm install http-echo-server -g
Just curl the URL of the app:
Alternatively - if installed locally - you can start the server using
http-echo-server, take note of the port it starts on and
then curl it:
Setting listening port
To set the http port, either supply the port as an argument to the
Or use the
PORT environment variable: