serve-dir

command module
v0.0.0-...-0318f30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: LGPL-2.1 Imports: 4 Imported by: 0

README

Serve dir

GitHub GitHub go.mod Go version GitHub release (latest by date)

Description

Serve dir is a GO cli tool developed to serve all files and folders inside a directory using a HTTP server. Don't use this as your main option to serve files, the security level of this tool was imagined only on the level of someone that wish to serve (for any reason) files inside a directory using the HTTP protocol.

How to Use

Prerequisites

Ensure you have Go installed on your machine. For instructions on Go installation, visit https://golang.org/doc/install.

Installation
go get -u github.com/NalbertLeal/serve-dir
Basic Usage

To serve a folder content just call Serve Dir inside the foder

serve-dir

The executable don't accept a path as parameter, so the follow is not supported:

serve-dir ./some-subfolder

The program return a file or an list of the files inside the folder. If the folder has an index.html file than return this file as default behavior. To avoid this behavior use the flag -no-index and all the folders content are returned. To never return the folders content (user receive an 404 when require access to folder content) jst use the flag -no-list.

Contribution

If you wish to contribute improvements, bug fixes, or new features, please feel free to open an issue or submit a pull request. Your contributions are highly appreciated!

License

This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL