Tape is a simple Web server which will serve up a directory of files and do simple proxying. It is quite handy when developing Web applications that do not depend on application servers.
Tape is built on top of Python and Twisted. It should work on versions of Twisted from 2.5 onward. If you have OS X, you already have both of these.
To install Tape, place the tape
executable somewhere in your path.
- Find a directory you wish to serve.
- Type
tape
- Browse to [http://localhost:8273] to see the result.
One of the best things about Tape is that it will reverse proxy other things easily. This is quite handy for applications which must make AJAX connections because of JavaScript's Same Origin Policy (SOP).
For example, if you are testing a JavaScript XMPP application, you will need to proxy the connection manager like so:
tape -P /xmpp-httpbind=http://localhost:5280/xmpp-httpbind
Now your normal files and your reverse proxies are all taken care of without ever touching Apache or Nginx configuration files!
Tape allows you to override its configuration in several ways. It will look at things in order, and options set in later steps override previous ones.
- It checks ~/.taperc
- It checks .taperc (in the current directory)
- It checks the configuration file given on the commandline with
-c
- It checks all the command line options
Please see taperc.example
to see how taperc files are constructed.
This code is copyright (c) 2009 by Jack Moffitt jack@metajack.im and
is available under the GPLv3.
See LICENSE.txt
for details.