https://github.com/klipitkas/fs-go
A tiny CLI tool to start a local file server.
https://github.com/klipitkas/fs-go
cli fileserver fs ftp go golang
Last synced: 12 months ago
JSON representation
A tiny CLI tool to start a local file server.
- Host: GitHub
- URL: https://github.com/klipitkas/fs-go
- Owner: klipitkas
- License: unlicense
- Created: 2019-10-20T09:50:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-06T10:01:17.000Z (over 6 years ago)
- Last Synced: 2024-06-20T08:01:51.568Z (about 2 years ago)
- Topics: cli, fileserver, fs, ftp, go, golang
- Language: Go
- Size: 7.81 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FS Go
FS Go is a tiny CLI tool in order to spawn a local file server.
### REQUIREMENTS
- [Go](https://golang.org) >= **1.13**
### BUILD
In order to build the executable run the following command:
```bash
go build
```
### START THE SERVER
Starting the server is easy:
```bash
./fs-go -addr 8080 -dir .
```
Only two parameters are needed:
- **dir**: The directory that will be served. (**default**: `.`)
- **addr**: The address that the server will listen to. (**default**: `:8080`)
### INSTALL GLOBALLY
If you only want to use this CLI tool as a binary then you can do that
easily:
```bash
go install
```
Now you can use:
```bash
fs-go
```
From anywhere in your system.
### BUILD AND RUN WITH DOCKER
To build the Docker image:
```bash
docker build -t fs:local .
```
Run the server using Docker:
```
docker run --rm -v $(pwd):/data -p 8080:8080 -d fs:local
```
To run the server using Docker in a different port:
```
docker run --rm -v $(pwd):/data -p 9000:9000 fs:local -addr :9000
```