Categorygithub.com/weaming/s
modulepackage
0.0.0-20221014113523-66f7ab5fcd7d
Repository: https://github.com/weaming/s.git
Documentation: pkg.go.dev

# README

Simple static server with optional basic authentication.

Usage

Install

go get github.com/weaming/s

Options

Usage: s [options] ROOT
The ROOT is the directory to be serve.

  -a	Whether need authorization.
  -git
    	Whether serve as git protocol smart http
  -l string
    	Listen [host]:port, default bind to 0.0.0.0 (default ":8000")
  -n int
    	The maximum number of files in each page. (default 20)
  -p string
    	Basic authorization password (default "admin")
  -pure
    	serve static on /
  -u string
    	Basic authorization username (default "admin")

Services

  • /index: file browser
  • /s: static file server
  • /git or /(--git): git server
  • /ws/: file as websocket, new message if file appended new content

# Functions

No description provided by the author
BasicAuth wraps a handler requiring HTTP basic auth for it using the given username and password and the specified realm, which shouldn't contain quotes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author