FS Go is a tiny CLI tool in order to spawn a local file server.
- Go >= 1.13
In order to build the executable run the following command:
go buildStarting the server is easy:
./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)
If you only want to use this CLI tool as a binary then you can do that easily:
go installNow you can use:
fs-goFrom anywhere in your system.
To build the Docker image:
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