Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 735 Bytes

File metadata and controls

33 lines (28 loc) · 735 Bytes

debug-webserver

Simple nodejs webserver without any dependencies for debugging purposes.

It listens to every route and method and returns the request details as json.

Example:

Request:

$ curl --location 'localhost:3000/some/test?foo=bar' \
--header 'Content-Type: application/json' \
--data '{"foo": "bar"}'

Response:

{
    "method": "POST",
    "url": "/some/test?foo=bar",
    "headers": {
        "content-type": "application/json",
        "accept": "*/*",
        "host": "localhost:3000",
        "accept-encoding": "gzip, deflate, br",
        "connection": "keep-alive",
        "content-length": "14"
    },
    "host": "homearch",
    "workspaceId": 123,
    "body": "{\"foo\": \"bar\"}"
}