Skip to content

Serve a directory of files over HTTP under a random guid

License

Notifications You must be signed in to change notification settings

luntain/adhoc-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adhoc-http

A command line program to quickly create an http server serving files from one or more directories on a local disk. Each directory will be avialable over http at a randomly generated guid or the specified prefix.

Example usage:

$ adhoc-http -p 8080 path/to/dir/one path/to/dir/two:Foo
...
Serving following dirs:
* path/to/dir/one at http://organon.local:8080/4725de26-1722-43bc-9a5e-712ce574b7b1/
* path/to/dir/two at http://organon.local:8080/Foo/
* path/to/dir/three at http://organon.local:8080/fiz/baz/

Serve without prefix:

$ adhoc-http -p 8080 path/to/dir:
Serving following dirs:
* path/to/dir at http://organon.local:8080/

The server is based on Snap. Some files are served compressed, based on the file extension, determined by Snap defaults. I have modified the defaults to additionally compress csv files. Come to think of it, perhaps a better solution would be to compress everything except for files that are known to be compressed. Pull requests welcome.

About

Serve a directory of files over HTTP under a random guid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published