# srv **Repository Path**: bejames/srv ## Basic Information - **Project Name**: srv - **Description**: 通过 http(s) 调试本地文件(夹) - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-31 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # srv: Serve content through http(s) ## [中文](./docs/README_cn.md)  ## Install ```bash $ go install -u github.com/jamesbee/srv ``` ## Usage ### Show usage ```bash $ srv help up Bring up http(s) server. Usage: srv up [flags] Flags: -i, --dir string Default url for current working dir, e.g. /pwd (default "pwd") -e, --exclude strings Exclude those dirs, e.g. ".git,.idea" (default [.git]) -h, --help Show this message --host string Server listen host (default "127.0.0.1") -m, --markdown Enable markdown parse (default true) -p, --port int Server listen port (default 3000) -c, --tls-cert string TLS Cert path, e.g. ./cert.pem -t, --tls-enable Enable TLS -k, --tls-key string TLS Key path, e.g. ./cert.key Global Flags: --config string config file (default is $HOME/.srv.yaml) -d, --debug Enable debug output. --viper use Viper for configuration (default true) ``` ### Serve immediately Type `srv up` and serve current working dir on [http://127.0.0.1:3000](http://127.0.0.1:3000). You can always visit `/index` or `/index.html` to get all mapped routes (only if you are not serving your custom `index.html` file). e.g. ```bash $ cd server && srv up ``` Visit [http://localhost:3000/server](http://127.0.0.1:3000/server) and you will get: > >