https://github.com/thinknathan/node-simple-serv
Simple local server on command line
https://github.com/thinknathan/node-simple-serv
Last synced: 9 months ago
JSON representation
Simple local server on command line
- Host: GitHub
- URL: https://github.com/thinknathan/node-simple-serv
- Owner: thinknathan
- License: cc0-1.0
- Created: 2023-12-29T23:24:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T04:23:24.000Z (over 1 year ago)
- Last Synced: 2025-02-13T06:37:12.566Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 815 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Simple Server
[](https://github.com/thinknathan/node-simple-serv/actions/workflows/ci.yml) 
A simple localhost http server for testing, built on Node.
## Installation
1. Install [Nodejs](https://nodejs.org/en) or equivalent
2. Clone this project
`git clone https://github.com/thinknathan/node-simple-serv`
3. Install dependencies
`npm i`
or
`yarn`
4. Install for command-line usage
`npm link`
## Usage
`serve`
```
-p, --port Port number for the server [default: 8080]
-i, --index-extension Extension for the index file [default: "html"]
-s, --shared-array-buffer Enable security headers for SharedArrayBuffer
[boolean] [default: false]
-c, --content-security-policy Content Security Policy header value
[default: "default-src * data: blob: 'unsafe-inline' 'unsafe-eval'"]
```
## Background
Created with Chat-GPT 3.5.