A mini web server built by following Build Your Own Web Server From Scratch In Node.JS.
To start up all the servers:
$ npm run startTo test the TCP server using callback to echo back the data:
$ nc localhost 8081To test the TCP server using async/await to echo back the data:
$ nc localhost 8082To test the TCP server echoing back the data by message:
$ nc localhost 8083To test the default response:
$ curl -vvv http://localhost:8080To test the echo response:
$ curl -vvv --data-binary 'hello' http://localhost:8080/echoTo test the echo response using chunked request:
$ curl -vvv -T- http://localhost:8080/echoTo test the sheep counting using chunked response:
$ curl -vvv http://localhost:8080/sheepTo test static file serving:
$ curl -vvv http://localhost:8080/files/README.mdTo test static file serving using HEAD method:
$ curl -vvv -I http://localhost:8080/files/README.mdTo test 404 response when the file is not found:
$ curl -vvv http://localhost:8080/files/UNKNOWN.mdTo test compressed response:
$ curl -vvv --compressed http://localhost:8080