File: static_files.py

package info (click to toggle)
python-aiohttp 3.11.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,156 kB
  • sloc: python: 51,898; ansic: 20,843; makefile: 395; javascript: 31; sh: 3
file content (9 lines) | stat: -rwxr-xr-x 181 bytes parent folder | download | duplicates (27)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python3
import pathlib

from aiohttp import web

app = web.Application()
app.router.add_static("/", pathlib.Path(__file__).parent, show_index=True)

web.run_app(app)