Skip to content

Tool to start a web server to serve files from a directory.

Notifications You must be signed in to change notification settings

manvscode/host-this

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Host This

Host This is a tool to shares files with other users on your network. The idea is you can run the ht command for a specified directory and give other users a URL that they can connect to from their web browser. Then the other users can select which files they would like to download.

Host This Demo

Running

To run, execute the ht command with the port number and directory:

$ ht -4 -p 9000 -t "Download these files" .
  _    _           _
 | |  | |         | |
 | |__| | ___  ___| |_
 |  __  |/ _ \/ __| __|
 | |  | | (_) \__ \ |_
 |_|  |_|\___/|___/\__|
     |__   __| |   (_)
        | |  | |__  _ ___
        | |  | '_ \| / __|
        | |  | | | | \__ \
        |_|  |_| |_|_|___/

Serving files from "."
Connect at:
 * http://10.0.0.88:9000/

To share, tell your friends to go to http://10.0.0.88:9000/ (your IP may be different) with their web browser.

To stop, just hit CTRL-C and you should see:

Stopping server...

Command Line Options

-v, --verbose     Toggles verbose mode.
-4, --ip4         Toggles IPv4 mode.
-p, --port        Sets the port that the web server listens on (default is 8080).
-t, --title       Sets the title on the web server.

Build Instructions

Ubuntu

  1. Install dependencies:
apt install -y autoconf automake libtool
  1. Build source code by running:
make

Mac OS X

  1. Install HomeBrew by running:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install dependencies:
brew install automake autoconf libtool
  1. Build source code by running:
make

Roadmap

  • Support https for secure communication.
  • Compress the request body with gzip.
  • Allow folders to be zipped up and sent over on demand.

License

Copyright (C) 2016 by Joseph A. Marrero, http://www.joemarrero.com/

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

About

Tool to start a web server to serve files from a directory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published