Run Tiny Webserver From Any Directory
There are alternatives to Resolve Symlinks When Copying Files With Rsync .
How about firing up a (tiny) webserver that starts up quickly. Yehuda Katz suggested this some years ago:
Just drop this file in any directory, run the script, and it serves the files. I use this frequently for instance when I need to browser test static files on different virtual machines. (I modified the script shebang to work on my Mac).
I prefer to use this server.rb script in stead of accessing the files from a shared folder from the virtual machine. It’s faster to write the address for http://172.16.244.1:2000/accordion.html
than for \\.host\Shared Folders\jesper On My Mac\src\htmlguide\accordion.html
– and easier to remember.
Tip from Yehuda Katz’ “Webrick Anywhere“
December 1st, 2009 at 22:26 (GMT-1)
Or you could run “python -m SimpleHTTPServer”
December 2nd, 2009 at 09:55 (GMT-1)
@jj, thanks for the tip!
I’m always flattered by comments like yours. The audience of this blog is just much smarter than I will ever get :)
December 4th, 2009 at 18:05 (GMT-1)
Thanks for your smartness, I will try to practice it.
December 6th, 2009 at 17:31 (GMT-1)
[…] faldt over dette tip om at køre en lille webserver fra hvilket som helst bibliotek på din PC og det så umiddelbart interessant ud. En kommentar til artiklen var dog det der virkelig gjorde en […]