goserve

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 7 Imported by: 0

README

goserve

goserve is a simple and secure command-line HTTP server. It can be used as an alternative to python3's http.server. It leverages go's standard library to do all the heavy lifting.

Installation

$ go install github.com/zhangyuannie/goserve

Usage

goserve [options]

By default, the current working directory is served.

Options
-cert string
      path to the TLS certificate file
-dir string
      alternate directory to serve
-host string
      address to listen on
-key string
      path to the TLS private key file
-password string
      password for basic authentication
-port int
      port number (default 8000)
-username string
      username for basic authentication
-version
      print goserve version
Examples

To serve the current directory on port 8001:

$ goserve --port 8001

To serve /var/www/ over TLS:

$ goserve --dir /var/www/ --key key.pem --cert cert.pem

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL