![]() ![]() To use the watcher server directly and have more control over the I/O watch ( "/path/to/html", open_browser = False ) To avoid this, do theįollowing: import httpwatcher httpwatcher. Note that, unlike HttpWatcherServer, the httpwatcher.watchįunction automatically assumes that you want to open your default webīrowser at the base URL of the served site. Project, and then: import httpwatcher # Just watch /path/to/html, and serve from that same path httpwatcher. Make sure httpwatcher is installed as a dependency for your Python no-browser # causes httpwatcher to not attempt to open your web browser automatically Library Usage verbose \ # enable verbose debug logging base-path /blog/ \ # serve static content from watch "/path1,/path2" \ # comma-separated list of paths to watch (defaults to the static root) With all possible options: > httpwatcher -root /path/to/html \ # static root from which to serve files The quickest way to get up and running is to watch the current folderĪnd serve your content from as follows: # Also opens your web browser at > httpwatcher Httpwatcher can either be used from the command line, or as aĭrop-in library within your own Python application. To upgrade to the latest version of httpwatcher, simply: > pip install -U httpwatcher Usage In order to install httpwatcher, you will need: ![]() Of their static web sites, and is not at all intended as a production Note that httpwatcher is intended for developers during testing Live reloading is triggered via web sockets. Httpwatcher is both a library and command-line utility for firing upĪ simple HTTP server to serve static files from a specific root path. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |