A simple binary written in go for serving your current directory as static content over HTTP from the terminal. Just run go install github.com/integrii/serve@latest and use.
Free, open source, fast, and simple.
- Have go installed (duh?)
- Install with go:
go install github.com/integrii/serve@latest - If your
$PATHenvironment variable has$GOBINin it, then you can now simply useserve- Otherwise, you will need to run
$GOBIN/serveor if you don't even have$GOBINset, you must run$GOPATH/bin/serve
- Otherwise, you will need to run
- Run
serve. - See results at http://127.0.0.1:8000
- Hit
Control-Cto stop the server gracefully
Run serve --help to see command line options:
Usage of serve:
-l string
The address for the server to listen on. Examples: :80, 127.0.0.1:8000 (default ":8000")
-p string
The path for the server to serve. (default "/Current/directory")
