Categorygithub.com/oneleo/gofs
repositorypackage
0.0.0-20210225093537-79ec184d0827
Repository: https://github.com/oneleo/gofs.git
Documentation: pkg.go.dev

# README

gofs

Gofs is a small file server 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.

Install

$> go install github.com/oneleo/gofs@latest

Usage

  1. Start this file server listen on default port :80 for browse ./ current folder:
$> gofs

How to Use

  1. Start this file server listen on default port :80 for browse ./ current folder, and auto-open in browser:
$> gofs -b
  1. Start this file server listen on specified port :8081 for browse specified ./www folder, and auto-open in browser:
$> gofs -p 8081 -f ./www -b
  1. Help message
$> gofs -h
OR
$> gofs --help
$> gofs -h
Gofs is a small file server for Browsing specify local folder and files.
Usage:

        gofs [-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:
  gofs
        Start this file server listen on port ":80" for browse "./" current folder.
  gofs -b
        Start this file server listen on port ":80" for browse "./" current folder, and open in browser.
  gofs -p 8081 -f ./www -b
        Start this file server listen on specify port ":8081" for browse "./www" specify folder, and open in browser.

References