https://github.com/jkulton/platter
Create a file server with a single command
https://github.com/jkulton/platter
cli command-line file-server golang http
Last synced: 9 months ago
JSON representation
Create a file server with a single command
- Host: GitHub
- URL: https://github.com/jkulton/platter
- Owner: jkulton
- License: mit
- Created: 2021-01-29T05:05:48.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-27T23:11:58.000Z (almost 5 years ago)
- Last Synced: 2025-03-30T08:11:27.379Z (10 months ago)
- Topics: cli, command-line, file-server, golang, http
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Platter
[](https://goreportcard.com/report/github.com/jkulton/platter)
Create a file server from a directory, fast.
Platter is a simple wrapper around the Go standard library [`net/http` `FileServer`](https://golang.org/pkg/net/http/#FileServer).
## Install
Before installing please have Go installed and `$GOPATH/bin` in your `$PATH`. ([More info here](https://golang.org/doc/install#install))
```sh
go get github.com/jkulton/platter/cmd/platter
```
## Usage
```sh
platter
```
Once you've installed, just run `platter` to serve the files in your current directory over HTTP.
## Options/Flags
(all options are as their name implies optional)
| Flag | Default | Description |
|------|---------|-------------|
| `-p 8080` | `8000` | Port to bind to |
| `-d ./files` | `.` | Local directory of files to serve |
| `-a 192.168.1.2` | `0.0.0.0` | Address to serve on |
| `-auth username:password` | No default | `user:pass` formatted authorization (for HTTP basic auth) |