Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/integrii/serve
- Owner: integrii
- License: apache-2.0
- Created: 2017-09-09T08:18:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-14T07:12:33.000Z (over 6 years ago)
- Last Synced: 2024-06-20T16:33:39.620Z (5 months ago)
- Topics: cli, current-directory, go, golang, http, server, static-server
- Language: Go
- Homepage:
- Size: 1.51 MB
- Stars: 13
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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")
```