blag.devserver¶
Development Server.
This module provides functionality for blag’s development server. It automatically detects changes in certain directories and rebuilds the site if necessary.
Functions
|
Start the autoreloader. |
|
Get the last modified time. |
|
Start the webserver and the autoreloader. |
- blag.devserver.autoreload(args)¶
Start the autoreloader.
This method monitors the given directories for changes (i.e. the last modified time). If the last modified time has changed, a rebuild is triggered.
- Parameters
args (argparse.Namespace) –
- blag.devserver.get_last_modified(dirs)¶
Get the last modified time.
This method recursively goes through dirs and returns the most recent modification time time found.
- Parameters
dirs (list[str]) – list of directories to search
- Returns
most recent modification time found in dirs
- Return type
int
- blag.devserver.serve(args)¶
Start the webserver and the autoreloader.
- Parameters
args (arparse.Namespace) –