1.0.1 • Published 4 years ago

@zebrajaeger/dummy-http-server v1.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
4 years ago

Dummy http server

License: LGPL v3 npm version

Logs incoming requests (GET,POST,...) to console and returns 200.

Installation

npm install -g @zebrajaeger/dummy-http-server

Start

Exec

dhs

or

dummy-http-server

into terminal.

Default port is 2999. change ist wit -p or --port option:

dhs -p 1234

Stop

Press ctrl + C within console window.

Use

Make a request with a browser:

http://localhost:2999

The console log may look like this one:

headers: { host: 'localhost:2999',
  connection: 'keep-alive',
  'upgrade-insecure-requests': '1',
  'user-agent':
   'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36',
  'sec-fetch-user': '?1',
  accept:
   'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
  'sec-fetch-site': 'none',
  'sec-fetch-mode': 'navigate',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'de-DE,de;q=0.9,en;q=0.8',
  cookie: 'io=6MrMv9kVc25N62FEAAA1' }
cookies: { io: '6MrMv9kVc25N62FEAAA1' }
 body: {}