https://github.com/poneding/file-server
A simple file server that serves files from a directory.
https://github.com/poneding/file-server
Last synced: about 1 month ago
JSON representation
A simple file server that serves files from a directory.
- Host: GitHub
- URL: https://github.com/poneding/file-server
- Owner: poneding
- Created: 2024-05-13T06:18:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T02:27:01.000Z (about 2 years ago)
- Last Synced: 2025-11-24T03:07:53.271Z (7 months ago)
- Language: Go
- Homepage:
- Size: 10.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# file-server
A simple file server that serves files from a directory.
## Install
```bash
go install github.com/poneding/file-server@latest
```
## Usage
Two ways to specify the directory to serve files from:
1. Specify the directory to serve files from as an argument.
```bash
file-server /path/to/files
```
2. Specify the directory to serve files from with the `FS_PATH` environment variable.
```bash
FS_PATH=/path/to/files file-server
```
Then, open your browser and navigate to `http://localhost:8080/` to view the files.