the fast, reliable localhost tunneling solution


Running a Python web server

By Bjarni R. Einarsson 2011-01-16, 13:26

Note!

The following, although still valid, is largely pointless now that pagekite.py 0.4.x comes with its own built-in web server. If you want to put the contents of a folder temporarily on the web, this command will do the job:

$ pagekite.py /path/to/folder YOURNAME.pagekite.me

Much easier!

Original content ...

Since you already have Python installed in order to run pagekite.py, you can try the built-in Python HTTP server for sharing files or just testing PageKite. At the command prompt, enter the folder you would like to make visible and run the following:

python -m SimpleHTTPServer 8000

This will create a web-server serving only the files in the current working directory, on port 8000.

Note that this server is very simple, slow and probably a security risk. It probably isn't wise to leave it running for long, but it can be quite useful for testing.

The HowTo contains links to other, more powerful servers.

Comments

  1. Tintenpatronen111 said on 2021-08-22, 17:26
    This does not tell me anything about running a python backend with pagekite. It only serves the python file as text
    Permalink

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!