Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/integrii/serve

🕸 A robust and handy tool for serving your current terminal directory over HTTP
https://github.com/integrii/serve

cli current-directory go golang http server static-server

Last synced: about 18 hours ago
JSON representation

🕸 A robust and handy tool for serving your current terminal directory over HTTP

Awesome Lists containing this project

README

        

# serve ⚡️

A simple binary written in go for serving your current directory as static content over HTTP from the terminal. Just run `go get github.com/integrii/serve` and use.

Free, open source, fast, and simple.

![serve](https://github.com/integrii/serve/blob/master/tutorial.gif?raw=true "Why did a static command line serve this good not exist yet?")

# Installation

- [Have go installed](https://golang.org) _(duh?)_
- Install with go: `go get github.com/integrii/serve`
- If your `$PATH` environment variable has `$GOBIN` in it, then you can now simply use `serve`
- Otherwise, you will need to run `$GOBIN/serve` or if you don't even have `$GOBIN` set, you must run `$GOPATH/bin/serve`

# Usage

- Run `serve`.
- See results at [http://127.0.0.1:8000](http://127.0.0.1:8000)
- Hit `Control-C` to stop the server gracefully

# Options

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")
```