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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyODcwNDQsIm5iZiI6MTcyMDI4Njc0NCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQyNjI5LTc0YzEwNzkxLTYyZDUtNGU2OC05ODhhLTYyZGZiYTI5NjVmZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA2JTJGdXMtZWFzdC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CJ9.fTBJW4phSpE7_kNfXX77kdwk7GZyiprfkpjhz14PzQQ)
![screenshot3](https://private-user-images.githubusercontent.com/108779415/303943348-da666e86-ae02-4c25-8fe7-cb5f9f8f04c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyODcwNDQsIm5iZiI6MTcyMDI4Njc0NCwicGF0aCI6Ii8xMDg3Nzk0MTUvMzAzOTQzMzQ4LWRhNjY2ZTg2LWFlMDItNGMyNS04ZmU3LWNiNWY5ZjhmMDRjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNlQxNzI1NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MmEzNmNiMGY5NDcwNTYyZmFjODJmNTI3Zjk0YmFhYjA5YzlkYWQ3Yjc0OGJiOTdkMzBhODNiYjI2MGViMmM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wCjjki-VHeyPJwwnoeXtXtkXZLbaHb90vXGnPxJziJQ)
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.