T-Service is on PyPI, install it with:
pip install tservice.
T-Service works on Python 2.7 and Python 3.
T-Service installs a command line utility called
tserve has one required parameter:
the directory from which to serve files.
For example, to start the server from a directory called
that's in your current directory, use this command:
The server starts on port 8000 by default, so you can look for your
Specifying a Port
If port 8000 is in use, or you want to use a different port, use the
tserve --port 7654 build
Specifying a Prefix
If you need to run the server so that it serves the files from some prefix
tserve --prefix myusername build
That will cause the files to be served from
(You may need to do this so that the local site matches where your
site will be deployed, e.g. GitHub Pages or a university server.)
Stopping the Server
control-C at the command line to stop the server.
Why Not Use Python's Server?
I've found I sometimes need to serve files with a prefix on the URL, and I don't know how to do that with Python's builtin server.