Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 730 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 730 Bytes

Simple HTTP Server

Usage

node ./index.js <port> <host> <responseBody> <responseStatus>

All the arguments are optional

Argument Description Default value
port The port of the server 9999
host The host of the server 0.0.0.0
responseBody The content returned by the server Hello, world!
responseStatus The status code returned by the server 200

Examples

node ./index.js 80 localhost "Lorem ipsum" 403

node ./index.js 8080 192.168.0.123

node ./index.js 81