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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NjQwNTgsIm5iZiI6MTcyMDc2Mzc1OCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQyNjI5LTc0YzEwNzkxLTYyZDUtNGU2OC05ODhhLTYyZGZiYTI5NjVmZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzEyJTJGdXMtZWFz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G9faWQ9MCJ9.rEaZ9-VS7z2OPmkoggRvtPt7PED4UqZDOvU-Uexuzr4)
![screenshot3](https://private-user-images.githubusercontent.com/108779415/303943348-da666e86-ae02-4c25-8fe7-cb5f9f8f04c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NjQwNTgsIm5iZiI6MTcyMDc2Mzc1OCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQzMzQ4LWRhNjY2ZTg2LWFlMDItNGMyNS04ZmU3LWNiNWY5ZjhmMDRjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxMlQwNTU1NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZjI2N2JjZTczNDQwYzEyODM4YTZhNzMyOTM4NjE0MjJlZTFjNzEzZmM4ZDcwYjEzZTllZTgwM2IzODViOTAxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.j87-5aAOjL0chA2Vp2iHNiyX9Jj4R5CBd2wejhBzVFc)
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.