Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
/ quickserve Public archive

Statically serve directories over https with no setup

License

Notifications You must be signed in to change notification settings

robertmeta/quickserve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick Serve

This is a very small little app to statically serve directories over HTTPS without any setup. It will generate self-signed https cert and key on run, by default it will serve the current directory.

Why?

Because serving directories over HTTP(s) is often the least painful way to quickly share something on a local network. I use it mostly as a quick and dirty way to stream stuff to my tablets from my main desktop.

I got sick of writing little "serve.go" files that just had

...
func main() {
        ...
        panic(http.ListenAndServe(":8080", http.FileServer(http.Dir("."))))
}

inside them that I would run with "go run serve.go"

Binaries

If you don't want to install Go in order to build this yourself, feel free to grab your platform specific binary from the releases section

Examples

  • quickserve :: will serve the current directory
  • quickserve -d /some/directory/to/serve -d other/local/directory :: will serve those two directories

Usage of quickserve

  • -a="localhost": The address to serve https on
  • -c="cert.pem": The name of the cert to use or generate
  • -d=[]: List of directories to serve (use multiple -d flags)
  • -k="key.pem": The name of the key to use or generate
  • -n=false: Force generation of new certs
  • -po=443: The port to serve https on

TODO

  • Tests
  • Add BasicAuth

About

Statically serve directories over https with no setup

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages