github.com/Revanth47/go-serve

A Command-Line Static File Server using Go


License
MIT
Install
go get github.com/Revanth47/go-serve

Documentation

go-serve

Command-Line Static File Server

Go Report Card Travis

Usage

How to use it? Just run (Default: serves current working directory on localhost:8000)

$ go-serve

Dont like the port? Then change it

$ go-serve -p 3000

Want to serve only a specific sub directory?

$ go-serve -d assets

Want to serve files through a different public path? (say localhost:8000/files/)?

$ go-serve --path /files/

Other options

$ go-serve --disable-dir // To disable directory listing
$ go-serve --read 10s    // Maximum request read time
$ go-serve --write 10s   // Maximum response write time 

Installation

$ go get -u github.com/Revanth47/go-serve

Contribute

Feel free to send Pull Requests to add/improve upon features or to fix bugs.

LICENSE

MIT