This is a simple Python script to serve static files from any project directory, useful when doing web development.
Simply put server.py
and server.cmd
in a directory, for instance C:\Users\YourName\bin
and add that directory to your PATH
.
Then in the console, cd
to your project folder, type server
and hit Enter (it will run on port 8000
by default, use server 5000
for example to change port). Use Ctrl+C
to stop the server.