repositorypackage
0.0.0-20210225093138-2d5a06fb4c1b
Repository: https://github.com/oneleo/fsgo.git
Documentation: pkg.go.dev
# README
FSGO
FSGO is a small file server with ZIP compression function for Browsing specify local folder and files.
PreRequire
- Install Git - Distributed version control system.
- Install Golang - Programming language.
- For Windows OS: Make sure
%GOPATH%\bin
is inclouded in%PATH%
environmental variables. - For Linux OS: Make sure
$GOPATH/bin
is inclouded in$PATH
environmental variables.
- For Windows OS: Make sure
Install
$> go get -u github.com/oneleo/fsgo
Usage
- Start this file server listen on default port
:80
for browse./
current folder:
$> fsgo
- Start this file server listen on default port
:80
for browse./
current folder, andauto-open
in browser:
$> fsgo -b
- Start this file server listen on specified port
:8081
for browse specified./www
folder, andauto-open
in browser:
$> fsgo -p 8081 -f ./www -b
- Help message
$> fsgo -h
OR
$> fsgo --help
$> fsgo -h
FSGO is a small file server with ZIP compression function for Browsing specify local folder and files.
Usage:
fsgo [-p port] [-f folder] [-b]
Flags:
-b Open URL in browser (shorthand)
-f string
Set shared folder (shorthand) (default "./")
-p int
Set listening port (shorthand) (default 80)
Examples:
fsgo
Start this file server listen on port ":80" for browse "./" current folder.
fsgo -b
Start this file server listen on port ":80" for browse "./" current folder, and open in browser.
fsgo -p 8081 -f ./www -b
Start this file server listen on specify port ":8081" for browse "./www" specify folder, and open in browser.
References
- Gist - Open browser in golang
- Stackoverflow - Start web server to open page in browser
- Stackoverflow - How to efficiently concatenate strings in go
- Stackoverflow - How to prevent favicon.ico requests
- Stackoverflow - Directory walker written in Go stops with file in use (locked) error
- Stackoverflow - Golang FileServer with custom css
- Stackoverflow - Go Templates: Are Nested Ranges Possible
- 2020/02/29 - Serving Static Sites with Go
- GitHub - Quickly spin up a file server
- GitHub - a simple static file server write in pure golang, support upload
- GitHub - Zmisgod: goTool/fileserver
- GitHub - A simple file server with no dependencies
- GitHub - Simple static file server
- Go Package - http