https://github.com/weaming/s
静态文件服务器
https://github.com/weaming/s
Last synced: 7 months ago
JSON representation
静态文件服务器
- Host: GitHub
- URL: https://github.com/weaming/s
- Owner: weaming
- License: mit
- Created: 2017-02-28T13:55:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-14T11:35:40.000Z (over 3 years ago)
- Last Synced: 2025-01-12T20:45:46.084Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 1.06 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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