Application and Server

WDOM applications consist of a single html document and a web server.

HTML Document Object

Web Server

Web server control functions.

wdom.server.add_static_path(prefix, path, no_watch=False)[source]

Add directory to serve static files.

First argument prefix is a URL prefix for the path. path must be a directory. If no_watch is True, any change of the files in the path do not trigger restart if --autoreload is enabled.

Return type:None

Start web server.

Run until Ctrl-c pressed, or if auto-shutdown is enabled, until when all browser windows are closed.

Return type:None

Get root web application object.

Return type:Application
wdom.server.start_server(browser=None, address=None, check_time=500, **kwargs)[source]

Start web server.

Use wrapper function start() instead.

Return type:HTTPServer

Terminate web server.

Return type:None