def serve_dir(dir_path):
<EOL>print('<STR_LIT>')<EOL>created_files = _create_index_files(dir_path, True)<EOL>if (PIL_ENABLED):<EOL><INDENT>print('<STR_LIT>')<EOL>background_indexer = BackgroundIndexFileGenerator(dir_path)<EOL>background_indexer.run()<EOL><DEDENT>_run_server()<EOL>_clean_up(created_files)<EOL>
Generate indexes and run server from the given directory downwards.
@param {String} dir_path - The directory path (absolute, or relative to CWD)
@return {None}