https://github.com/abiosoft/servefile
File Server for any directory or file
https://github.com/abiosoft/servefile
Last synced: over 1 year ago
JSON representation
File Server for any directory or file
- Host: GitHub
- URL: https://github.com/abiosoft/servefile
- Owner: abiosoft
- License: mit
- Created: 2015-04-26T00:36:19.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-26T18:08:06.000Z (about 11 years ago)
- Last Synced: 2025-01-23T14:51:17.130Z (over 1 year ago)
- Language: Go
- Size: 121 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://drone.io/github.com/abiosoft/servefile/latest)
# servefile
Quick way to serve any directory or file
## Installation
### Binary
Download binary for your platform on the [**Releases**](https://github.com/abiosoft/servefile/releases) page.
**Optional (Linux/OSX)**
Move it to `bin` for easy access.
```shell
$ mv servefile /usr/local/bin
```
### From source
Go is a prerequisite to installing servefile from source. Go installation instructions are available [**here**](http://golang.org/doc/install.html) if you do not have it installed.
```shell
$ go get github.com/abiosoft/servefile
```
## Usage
If a file is specified, the file will be served irrespective of the URL request path.
```shell
$ servefile -h
Usage of servefile:
-f=".": path to file or directory to serve, defaults to current directory
-h=false: show this help
-p=8080: port to listen on
$ servefile -f /var/www/html
2015/04/26 01:43:33 servefile serving on port 8080
```