Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 967 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 967 Bytes

serve: serve files or folders

stolen from: https://github.com/itang/gohttp with a few additions. If the path you specify for serving is a file this will create a tmp folder and serve up a copy of just that single file. I find this useful for when I want to share a file with co-workers but don't want to share the other files in the directory.

It also generates a url to your machine [http://your.ip:port] and copies it your clipboard for easy pasting in your favorite chat client or whatever.

  • Linux requires xclip or xsel to be installed

Installation

go get -u github.com/devonmoss/serve
go install github.com/devonmoss/serve

Usage

$ serve --help

$ serve
Serving HTTP on 192.168.1.103 port 8080 from "/home/workspace/work" ...

$ serve -d /home -p 9000
Serving HTTP on 192.168.1.128 port 9000 from "/home" ...

License

Distributed under the Apache License Version 2.0.