class_docstr: A frontend that serves static files from a directory using FastAPI.
  
  Return this in your `LightningFlow.configure_layout()` method if you wish to serve a HTML page.
  
  Arguments:
      serve_dir: A local directory to serve files from. This directory should at least contain a file `index.html`.
      root_path: A path prefix when routing traffic from behind a proxy at `/<root_path>`
  
  Example:
  
      In your LightningFlow, override the method `configure_layout`:
  
      .. code-block:: python
  
          def configure_layout(self):
              return StaticWebFrontend("path/to/folder/to/serve")
class_docstr_tok: ["A","frontend","that","serves","static","files","from","a","directory","using","FastAPI",".","Return","this","in","your","`","LightningFlow.configure_layout","(",")","`","method","if","you","wish","to","serve","a","HTML","page",".","Arguments",":","serve_dir",":","A","local","directory","to","serve","files","from",".","This","directory","should","at","least","contain","a","file","`","index.html","`",".","root_path",":","A","path","prefix","when","routing","traffic","from","behind","a","proxy","at","`","\/","<","root_path",">","`","Example",":","In","your","LightningFlow",",","override","the","method","`","configure_layout","`",":","..","code-block",":",":","python","def","configure_layout","(","self",")",":","return","StaticWebFrontend","(","``","path\/to\/folder\/to\/serve","''",")"]
code: def start_server(
      self, host: str, port: int, root_path: str = ""
  ) -> None:
      log_file = str(get_logfile())
      self._process = mp.Process(
          target=_start_server,
          kwargs={
              "host": host,
              "port": port,
              "serve_dir": self.serve_dir,
              "path": f"/{self.flow.name}",
              "log_file": log_file,
              "root_path": root_path,
          },
      )
      self._process.start()
  
file_path: pytorch-lightning/src/lightning/app/frontend/web.py
imports: import multiprocessing
  from argparse import ArgumentParser
  from typing import Optional
  from urllib.parse import urljoin
  import uvicorn
  from fastapi import FastAPI
  from fastapi.middleware.cors import CORSMiddleware
  from starlette.staticfiles import StaticFiles
  from lightning.app.frontend.frontend import Frontend
  from lightning.app.utilities.log import get_logfile
  from lightning.app.utilities.network import find_free_network_port
label_desc: Use image node_id 2 for calling the StaticWebFrontend obj's underlying member method code with example usage: obj.start_server(host, port, root_path) without return types