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.
- Serve specific files
- Serve directories with directory listings
- Basic authentication support
- Customizable port number
- Single binary, no external dependencies
-
Download the binary with wget:
wget https://github.com/JCoupalK/FlyServe/releases/download/1.0/flyserve_linux_amd64_1.0.tar.gz
-
Unpack it with tar
tar -xf flyserve_linux_amd64_1.0.tar.gz
-
Move it to your /usr/local/bin/ (Optional):
sudo mv flyserve /usr/local/bin/flyserve
-
Ensure you have Go installed on your system. You can download Go from here.
-
Clone the repository:
git clone https://github.com/JCoupalK/FlyServe
-
Navigate to the cloned directory:
cd FlyServe
-
Build the tool:
go build -o flyserve .
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
-h, --html Enable auto-resolution of .html files
# 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 -h
![screenshot1](https://private-user-images.githubusercontent.com/108779415/303942629-74c10791-62d5-4e68-988a-62dfba2965ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODE0MTUsIm5iZiI6MTczOTE4MTExNSwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQyNjI5LTc0YzEwNzkxLTYyZDUtNGU2OC05ODhhLTYyZGZiYTI5NjVmZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwOTUxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MDkxZjYzYzIzMGQ4MWQwMTA2MDc0OGFkMGNiNDhhNzBjMWFmZTczZTBmYTlhODVkNmY3M2NkNjMyYWJkNmRhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.dummWhCXhhuDYUzoiCqBA27DEZ-ynBUamyk_wlr_0Co)
![screenshot2](https://private-user-images.githubusercontent.com/108779415/303943422-3e93a041-c54e-4c64-96fb-d59ff63e6640.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODE0MTUsIm5iZiI6MTczOTE4MTExNSwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQzNDIyLTNlOTNhMDQxLWM1NGUtNGM2NC05NmZiLWQ1OWZmNjNlNjY0MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwOTUxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZGIxZDdlOWU0MjRmZTI4YmY3NTRiNTNkNDcwMWRjZGZmOWMwNDc0M2ViNzA2MWViMTgwOTFiZjEyZjlkMDlmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.hxsVcWJ6YWgsZsSZ9ft2rntIBYDPFepCo5j0JU8B2Zw)
![screenshot3](https://private-user-images.githubusercontent.com/108779415/303943348-da666e86-ae02-4c25-8fe7-cb5f9f8f04c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODE0MTUsIm5iZiI6MTczOTE4MTExNSwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQzMzQ4LWRhNjY2ZTg2LWFlMDItNGMyNS04ZmU3LWNiNWY5ZjhmMDRjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwOTUxNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNGM1Y2QwM2MxOWIzOTBiNGE4NDU1MmEwMGZlZWQxNzZjZGYzYzBlZmM1NGY1OWQxNWFhODY3N2JjY2I3NmYyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eVWjVG1HnJdo8o5rQUK2gxyWKzBbxWBJoNvlWnwz0J4)
Contributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.