An open API service indexing awesome lists of open source software.

https://github.com/stofte/serve-folder


https://github.com/stofte/serve-folder

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# Serve Folder

WIP developer utility for serving a directory via HTTP(S), similar to
nodes [http-server](https://www.npmjs.com/package/http-server).

Tested on Windows only for now.

- Cross-platform handling
- Threading/pools?

## Usage

Simple CLI server utility for hosting directories over HTTP

Usage: servefolder.exe [OPTIONS] [WWWROOT]

Arguments:
[WWWROOT] Web root directory. Defaults to the current directory if not set

Options:
-p, --port
Server port [default: 8080]
-b, --bind
Network interface to bind [default: 0.0.0.0]
-f, --certificate-filepath
Filepath for TLS certificate
-w, --certificate-password
Optional password for the TLS certificate file
-t, --certificate-thumbprint
Locally installed TLS certificate thumprint to use
-d, --default-documents
Default documents list. Specify option multiple times for each value in order of priority [default: index.html]
-m, --mime-types
Configure/override mime-types for file extensions
-i, --index-browsing
Enables directory browsing
-h, --help
Print help

## Examples:

C:\temp>servefolder
14:32:44.624 [INF] Serving "C:\temp" @ http://localhost:8080

## Notes

- [OpenSSL certificate operations for "removing" password](https://serverfault.com/a/1106205/18877)
- [Reading Windows Terminal colors is not supported](https://github.com/microsoft/terminal/issues/3718)