https://github.com/mrgrd56/simple-http-server
Simple HTTP server for testing
https://github.com/mrgrd56/simple-http-server
javascript nodejs simple-http-server testing
Last synced: 6 months ago
JSON representation
Simple HTTP server for testing
- Host: GitHub
- URL: https://github.com/mrgrd56/simple-http-server
- Owner: MRGRD56
- Created: 2022-06-05T08:39:10.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T08:39:22.000Z (almost 4 years ago)
- Last Synced: 2025-01-12T13:51:13.960Z (over 1 year ago)
- Topics: javascript, nodejs, simple-http-server, testing
- Language: JavaScript
- Homepage: http://localhost:9999
- Size: 0 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple HTTP Server
### Usage
```shell
node ./index.js
```
> 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
```shell
node ./index.js 80 localhost "Lorem ipsum" 403
node ./index.js 8080 192.168.0.123
node ./index.js 81
```