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
# 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
![screenshot1](https://private-user-images.githubusercontent.com/108779415/303942629-74c10791-62d5-4e68-988a-62dfba2965ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NDAwMDQsIm5iZiI6MTcyMTczOTcwNCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQyNjI5LTc0YzEwNzkxLTYyZDUtNGU2OC05ODhhLTYyZGZiYTI5NjVmZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC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9.mSXDSkN7L4SdcZgmDieIoi6c9lsOJ_J-2_y6GzGUqBM)
![screenshot3](https://private-user-images.githubusercontent.com/108779415/303943348-da666e86-ae02-4c25-8fe7-cb5f9f8f04c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NDAwMDQsIm5iZiI6MTcyMTczOTcwNCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQzMzQ4LWRhNjY2ZTg2LWFlMDItNGMyNS04ZmU3LWNiNWY5ZjhmMDRjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxMzAxNDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MjE5MDkxZTI1NzM5ZjU1N2RjOTcxNzE4OTU3NDcxNmEwNjkwZDkyOTNiOGE3MDU3YzA4YWM4NjM1MzQxN2YxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.aQqlG2hfCJSCFNW0L5b8e9u4h9_68zyQIJIyxMEiRCg)
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.