Code Monkey home page Code Monkey logo

handyhttpd's Introduction

handyhttpd – A Handy HTTP Server

handyhttpd, as its name implies, is a handy http server to enable public http access on any folder with a simple command. It’s designed for simplicity.

Tutorial

Installation

handyhttpd is written in go. Install latest go before start.

Use following command to get and build it with go.

go get github.com/huandu/handyhttpd
go install github.com/huandu/handyhttpd

handyhttpd will be built and installed to $GOPATH/bin/handyhttpd.

Basic Usage

Run it in any dir to get public http access.

[user@server /your/dir/foo]$ handyhttpd

handyhttpd listens port 9696 by default. This dir can be accessed by url http://localhost:9696/foo.

If you need to add more dir to handyhttpd, just go to that dir and run exactly the same command.

[user@server /your/dir/foo]$ cd /your/dir/bar
[user@server /your/dir/bar]$ handyhttpd

Maybe the dir name “bar” doesn’t sound cool, use --alias option to rename it.

[user@server /your/dir/bar]$ handyhttpd --alias=soundy_bar

Once you don’t need to provide http service any more, type handyhttpd --quit.

If port 9696 is not your favorate, you can specify a port by --port option on handyhttpd first start. Just notice that handyhttpd cannot change port after it’s up. Restart it to change port.

Use --help to explore all handyhttpd options and have fun.

Comparisions With python -m SimpleHTTPServer

In short, handyhttpd is a bit stronger and easier than python -m SimpleHTTPServer.

handyhttpd implements all python -m SimpleHTTPServer features.

In addition, it can

  • serve more than one dir on a single port.
  • run only one server instance at once – much easy to manage. You can start handyhttpd over one ssh connection and modify/quit it over another. There is no need for you to use ps and kill with handyhttpd.

handyhttpd's People

Contributors

huandu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

no2key

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.