Skip to content

JCoupalK/FlyServe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlyServe

License GitHub issues GitHub go.mod Go version (branch & subdirectory of monorepo)

FlyServe is a simple web server written in Go, designed to serve files and directories over HTTP. It provides features such as serving specific files, serving directories, basic authentication, and directory listings.

Table of Contents

Features

  • Serve specific files
  • Serve directories with directory listings
  • Basic authentication support
  • Customizable port number
  • Single binary, no external dependencies

Installation

  1. Download the binary with wget:

    wget https://github.com/JCoupalK/FlyServe/releases/download/1.0/flyserve_linux_amd64_1.0.tar.gz
  2. Unpack it with tar

    tar -xf flyserve_linux_amd64_1.0.tar.gz
  3. Move it to your /usr/local/bin/ (Optional):

    sudo mv flyserve /usr/local/bin/flyserve

Building from Source

  1. Ensure you have Go installed on your system. You can download Go from here.

  2. Clone the repository:

    git clone https://github.com/JCoupalK/FlyServe
  3. Navigate to the cloned directory:

    cd FlyServe
  4. Build the tool:

    go build -o flyserve .

Usage

Options:

-p, --port            Port to serve on (Default is 8080)
-f, --file            Specific file to serve
-d, --directory       Directory to serve files from (Default is current directory)
-u, --username        Username for basic authentication
-pw, --password       Password for basic authentication

Examples

# Serve files from the current directory on port 8080
flyserve

# Serve files from a specific directory on port 9000
flyserve -d /path/to/directory -p 9000

# Serve a specific file on port 8080 with basic authentication
flyserve -f /path/to/file.txt -u username -pw password

# Serve websites by just specifying a directory that contains an index.html
flyserve -d /path/to/website -p 80

Screenshots

screenshot1
screenshot2
screenshot3

Contributing

Contributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.